You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.
I often need to spawn entities from .wrld or .ent files, for example, when spawning a Projectile from a weapon.
The engine shouldn't need to load the .ent file every time you spawn it, we should have some sort of caching system that keeps the .ent file data in memory until we no longer need it.
Maybe a world resource where the user can cache files?
Proposal
ex.
world.cache(&mut emd,"my_most_used.ent");
The world will then hold an AssetKey for the file data, and the data will be freed from the Asset Engine/memory when the world is dropped or has its cache cleared.
This should also work for any file, as the bytes of the file will be the data cached
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I often need to spawn entities from .wrld or .ent files, for example, when spawning a Projectile from a weapon.
The engine shouldn't need to load the .ent file every time you spawn it, we should have some sort of caching system that keeps the .ent file data in memory until we no longer need it.
Maybe a world resource where the user can cache files?
Proposal
ex.
The world will then hold an AssetKey for the file data, and the data will be freed from the Asset Engine/memory when the world is dropped or has its cache cleared.
This should also work for any file, as the bytes of the file will be the data cached
The text was updated successfully, but these errors were encountered: