Add register_type for UiMaterialHandle and AnimationGraphHandle (#15784)

This commit is contained in:
Tim 2024-10-09 14:04:06 +00:00 committed by GitHub
parent 05b0f28ebf
commit 57c297becc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -1255,6 +1255,7 @@ impl Plugin for AnimationPlugin {
.register_type::<AnimationPlayer>()
.register_type::<AnimationTarget>()
.register_type::<AnimationTransitions>()
.register_type::<AnimationGraphHandle>()
.register_type::<NodeIndex>()
.register_type::<ThreadedAnimationGraphs>()
.init_resource::<ThreadedAnimationGraphs>()

View file

@ -59,10 +59,12 @@ where
"ui_material.wgsl",
Shader::from_wgsl
);
app.init_asset::<M>().add_plugins((
ExtractComponentPlugin::<UiMaterialHandle<M>>::extract_visible(),
RenderAssetPlugin::<PreparedUiMaterial<M>>::default(),
));
app.init_asset::<M>()
.register_type::<UiMaterialHandle<M>>()
.add_plugins((
ExtractComponentPlugin::<UiMaterialHandle<M>>::extract_visible(),
RenderAssetPlugin::<PreparedUiMaterial<M>>::default(),
));
if let Some(render_app) = app.get_sub_app_mut(RenderApp) {
render_app