We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c3131a commit cd0a642Copy full SHA for cd0a642
crates/bevy_asset/src/loader.rs
@@ -34,14 +34,16 @@ pub trait AssetLoader: Send + Sync + 'static {
34
/// and scripts. In Bevy, an asset is any struct that has an unique type id, as shown below:
35
///
36
/// ```rust
37
-/// use bevy_reflect::TypeUuid;
+/// use bevy_reflect::{TypePath, TypeUuid};
38
/// use serde::Deserialize;
39
40
-/// #[derive(Debug, Deserialize, TypeUuid)]
+/// #[derive(Debug, Deserialize, TypeUuid, TypePath)]
41
/// #[uuid = "39cadc56-aa9c-4543-8640-a018b74b5052"]
42
/// pub struct CustomAsset {
43
/// pub value: i32,
44
/// }
45
+/// # fn is_asset<T: bevy_asset::Asset>() {}
46
+/// # is_asset::<CustomAsset>();
47
/// ```
48
49
/// See the `assets/custom_asset.rs` example in the repository for more details.
0 commit comments