Expand description
Resource management
Re-exports§
pub use fyrox_core as core;
Modules§
- constructor
- A module for creating resources by their UUIDs. It is used to make resource system type-agnostic yet serializable/deserializable. Type UUID is saved together with resource state and used later on deserialization to create a default instance of corresponding resource.
- entry
- Resource manager timed entry. It holds strong reference for a resource and a simple timer variable. When someone uses a resource, the timer variable is reset to default resource lifetime. Timer gradually decreases its value and once it reaches zero, the entry is deleted. The inner resource might still be in use (have a strong reference to it), the resource data will be deleted once no one uses the resource.
- event
- Resource event handling.
- graph
- Resource dependency graph. See
ResourceDependencyGraph
docs for more info. - io
- Provides an interface for IO operations that a resource loader will use, this facilliates things such as loading assets within archive files
- loader
- Resource loader. It manages resource loading.
- manager
- Resource manager controls loading and lifetime of resource in the engine. See
ResourceManager
docs for more info. - options
- Resource import options common traits.
- state
- A module that handles resource states.
- untyped
- A module for untyped resources. See
UntypedResource
docs for more info.
Macros§
Structs§
- Resource
- A resource of particular data type. It is a typed wrapper around
UntypedResource
which does type checks at runtime. SeeUntypedResource
for more info. - Resource
Header Guard - Provides typed access to a resource state.
Constants§
- CURVE_
RESOURCE_ UUID - Type UUID of curve resource. It is defined here to load old versions of resources.
- MODEL_
RESOURCE_ UUID - Type UUID of model resource. It is defined here to load old versions of resources.
- SHADER_
RESOURCE_ UUID - Type UUID of shader resource. It is defined here to load old versions of resources.
- SOUND_
BUFFER_ RESOURCE_ UUID - Type UUID of sound buffer resource. It is defined here to load old versions of resources.
- TEXTURE_
RESOURCE_ UUID - Type UUID of texture resource. It is defined here to load old versions of resources.
Traits§
- Resource
Data - A trait for resource data.
- Resource
Load Error - A trait for resource load error.
- Typed
Resource Data - Extension trait for a resource data of a particular type, which adds additional functionality,
such as: a way to get default state of the data (
Default
impl), a way to get data’s type uuid. The trait has automatic implementation for any type that implementsResourceData + Default + TypeUuidProvider
traits.
Functions§
- collect_
used_ resources - Collects all resources used by a given entity. Internally, it uses reflection to iterate over each field of every descendant sub-object of the entity. This function could be used to collect all resources used by an object, which could be useful if you’re building a resource dependency analyzer.