pub trait AppExt {
// Required method
fn register_dlc_type<T: Asset>(&mut self) -> &mut Self;
}Required Methods§
Sourcefn register_dlc_type<T: Asset>(&mut self) -> &mut Self
fn register_dlc_type<T: Asset>(&mut self) -> &mut Self
Register a DlcLoader for the given asset type T. This is required for any asset type
that may be loaded from a DLC pack. The plugin registers loaders for common asset types
(Image, Scene, Mesh, Font, AudioSource, etc.) but you must register loaders for any custom
asset types.
Important: As of v2.0, this function also calls init_asset::<T>() to register the asset type itself, so you do not need to call init_asset separately.
Suggestion: If I missed a common asset type that should be supported out-of-the-box, please open an issue or PR to add it!
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.