Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

World/Ent caching system #247

@Bombfuse

Description

@Bombfuse

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions