Expand description
The asset prelude.
This includes the most common types in this crate, re-exported for your convenience.
Structs§
- Asset
Plugin - Provides “asset” loading and processing functionality. An
Asset
is a “runtime value” that is loaded from anAssetSource
, which can be something like a filesystem, a network, etc. - Asset
Server - Loads and tracks the state of
Asset
values from a configuredAssetReader
. This can be used to kick off new asset loads and retrieve their current load states. - Assets
- Stores
Asset
values identified by theirAssetId
.
Enums§
- Asset
Event - Events that occur for a specific loaded
Asset
, such as “value changed” events and “dependency” events. - AssetId
- A unique runtime-only identifier for an
Asset
. This is cheap toCopy
/Clone
and is not directly tied to the lifetime of the Asset. This means it can point to anAsset
that no longer exists. - Asset
Mode - Controls whether or not assets are pre-processed before being loaded.
- Handle
- A strong or weak handle to a specific
Asset
. If aHandle
isHandle::Strong
, theAsset
will be kept alive until theHandle
is dropped. If aHandle
isHandle::Weak
, it does not necessarily reference a liveAsset
, nor will it keep assets alive. - Untyped
Handle - An untyped variant of
Handle
, which internally stores theAsset
type information at runtime as aTypeId
instead of encoding it in the compile-time type. This allows handles acrossAsset
types to be stored together and compared.
Traits§
- Asset
- Declares that this type is an asset,
which can be loaded and managed by the
AssetServer
and stored inAssets
collections. - Asset
App - Adds asset-related builder methods to
App
. - Direct
Asset Access Ext