-
In a custom resource you could do: #[derive(Resource, Reflect, Default)]
#[reflect(Resource)]
MyCustomResource; Though, it doesn't apply for assets: #[derive(Asset, Reflect, Default)]
#[reflect(Asset) // not found in this scope
MyCustomAsset; Is there something I'm missing or it isn't possible to reflect custom assets at all? I've been enjoying Bevy a lot so far! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You need to import We should probably add this to the prelude, though, it doesn't seem to have much usage since it also requires special registration using |
Beta Was this translation helpful? Give feedback.
-
Yes it works, though I'm trying to make it possible to inspect my custom asset in bevy egui inspector but I'm still getting this error: Edit: I fixed it by adding |
Beta Was this translation helpful? Give feedback.
You need to import
bevy::asset::ReflectAsset
.We should probably add this to the prelude, though, it doesn't seem to have much usage since it also requires special registration using
App::register_asset_reflect
.