Crate bevy_asset

Crate bevy_asset 

Source

Re-exports§

pub use ron;

Modules§

io
meta
prelude
processor
saver
transformer

Macros§

embedded_asset
Creates a new embedded asset by embedding the bytes of the given path into the current binary and registering those bytes with the embedded AssetSource.
embedded_path
Returns the Path for a given embedded asset. This is used internally by embedded_asset and can be used to get a Path that matches the AssetPath used by that asset.
load_internal_asset
Loads an “internal” asset by embedding the string stored in the given path_str and associates it with the given handle.
load_internal_binary_asset
Loads an “internal” binary asset by embedding the bytes stored in the given path_str and associates it with the given handle.

Structs§

AddAsyncError
AssetEvents
A system set where events accumulated in Assets are applied to the AssetEvent Events resource.
AssetHandleProvider
Provides Handle and UntypedHandle for a specific asset type. This should only be used for one specific asset type.
AssetIndex
A generational runtime-only identifier for a specific Asset stored in Assets. This is optimized for efficient runtime usage and is not suitable for identifying assets across app runs.
AssetLoadFailedEvent
An event emitted when a specific Asset fails to load.
AssetLoaderError
AssetPath
Represents a path to an asset in a “virtual filesystem”.
AssetPlugin
Provides “asset” loading and processing functionality. An Asset is a “runtime value” that is loaded from an AssetSource, which can be something like a filesystem, a network, etc.
AssetServer
Loads and tracks the state of Asset values from a configured AssetReader. This can be used to kick off new asset loads and retrieve their current load states.
Assets
Stores Asset values identified by their AssetId.
AssetsMutIterator
A mutable iterator over Assets.
DirectNestedLoader
A builder for directly loading nested assets inside a LoadContext.
ErasedLoadedAsset
A “type erased / boxed” counterpart to LoadedAsset. This is used in places where the loaded type is not statically known.
InvalidGenerationError
LoadContext
A context that provides access to assets in AssetLoaders, tracks dependencies, and collects asset load state. Any asset state accessed by LoadContext will be tracked and stored for use in dependency events and asset preprocessing.
LoadDirectError
An error that occurs when attempting to call [LoadContext::load_direct]
LoadedAsset
The successful result of an AssetLoader::load call. This contains the loaded “root” asset and any other “labeled” assets produced by the loader. It also holds the input AssetMeta (if it exists) and tracks dependencies:
LoadedFolder
A “loaded folder” containing handles for all assets stored in a given AssetPath.
LoadedUntypedAsset
A “loaded asset” containing the untyped handle for an asset stored in a given AssetPath.
MissingAssetLoaderForExtensionError
An error that occurs when an AssetLoader is not registered for a given extension.
MissingAssetLoaderForTypeIdError
An error that occurs when an AssetLoader is not registered for a given Asset TypeId.
MissingAssetLoaderForTypeNameError
An error that occurs when an AssetLoader is not registered for a given std::any::type_name.
NestedLoader
A builder for loading nested assets inside a LoadContext.
ReflectAsset
Type data for the TypeRegistry used to operate on reflected Assets.
ReflectHandle
Reflect type data struct relating a Handle<T> back to the T asset type.
StrongHandle
The internal “strong” Asset handle storage for Handle::Strong and UntypedHandle::Strong. When this is dropped, the Asset will be freed. It also stores some asset metadata for easy access from handles.
TrackAssets
A system set that holds all “track asset” operations.
UntypedAssetLoadFailedEvent
An untyped version of AssetLoadFailedEvent.
UntypedDirectNestedLoader
A builder for directly loading untyped nested assets inside a LoadContext.
UntypedNestedLoader
A builder for loading untyped nested assets inside a LoadContext.

Enums§

AssetEvent
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 to Copy/Clone and is not directly tied to the lifetime of the Asset. This means it can point to an Asset that no longer exists.
AssetLoadError
An error that occurs during an Asset load.
AssetMetaCheck
Configures how / if meta files will be checked. If an asset’s meta file is not checked, the default meta for the asset will be used.
AssetMode
AssetServerMode
The “asset mode” the server is currently in.
DependencyLoadState
The load state of an asset’s dependencies.
DeserializeMetaError
An error that occurs while deserializing AssetMeta.
Handle
A strong or weak handle to a specific Asset. If a Handle is Handle::Strong, the Asset will be kept alive until the Handle is dropped. If a Handle is Handle::Weak, it does not necessarily reference a live Asset, nor will it keep assets alive.
LoadState
The load state of an asset.
ParseAssetPathError
An error that occurs when parsing a string type to create an AssetPath fails, such as during AssetPath::parse or AssetPath::from<'static str>.
ReadAssetBytesError
An error produced when calling LoadContext::read_asset_bytes
RecursiveDependencyLoadState
The recursive load state of an asset’s dependencies.
UntypedAssetConversionError
Errors preventing the conversion of to/from an UntypedHandle and a Handle.
UntypedAssetId
An “untyped” / “generic-less” Asset identifier that behaves much like AssetId, but stores the Asset type information at runtime instead of compile-time. This increases the size of the type, but it enables storing asset ids across asset types together and enables comparisons between them.
UntypedAssetIdConversionError
Errors preventing the conversion of to/from an UntypedAssetId and an AssetId.
UntypedHandle
An untyped variant of Handle, which internally stores the Asset type information at runtime as a TypeId instead of encoding it in the compile-time type. This allows handles across Asset types to be stored together and compared.

Traits§

Asset
AssetApp
Adds asset-related builder methods to App.
AssetContainer
A type erased container for an Asset value that is capable of inserting the Asset into a World’s Assets collection.
AssetLoader
Loads an Asset from a given byte Reader. This can accept AssetLoader::Settings, which configure how the Asset should be loaded.
AsyncReadExt
Extension trait for AsyncRead.
AsyncWriteExt
Extension trait for AsyncWrite.
DirectAssetAccessExt
ErasedAssetLoader
Provides type-erased access to an AssetLoader.
VisitAssetDependencies

Functions§

handle_internal_asset_events
A system that manages internal AssetServer events, such as finalizing asset loads.

Derive Macros§

Asset