Just trying to make sure I understand asset loading correctly. If I pass an asset loader and load a file every time a that asset is needed, that asset is likely to be constantly loaded/unloaded right? Thus would it be better for very commonly used assets like the primary font to store them as a resource so there is always a strong handle?
#Caching extremely common assets?
6 messages · Page 1 of 1 (latest)
I think so. Generally speaking, people tend to store the handle in a resource until it’s no longer needed
Which sounds like something you’d benefit from as well
Makes sense, thanks!
Worth pointing out that so long as a handle already exists for a given file, the asset loader will immediately return that handle rather than reloading the file, even if you just tell it to load the filepath. (at least I'm pretty sure that's how it works; I've seen it mentioned before but I'm not exactly up-to-date with bevy's internals lol)
i have also heard that, and hopefully it still holds, would be a bit silly to load a second time