Skip to content

Commit 7056340

Browse files
pcwaltonmockersf
authored andcommitted
Add missing #[reflect(Component, Default)] to SceneRoot and DynamicSceneRoot. (#16816)
Someone forgot to add these, and I need them since I spawn these components in my [glXF] files. [glXF]: https://github.com/pcwalton/bevy-glxf-loader/
1 parent 1030a99 commit 7056340

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/bevy_scene/src/components.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use bevy_asset::Handle;
22
use bevy_derive::{Deref, DerefMut};
3-
use bevy_ecs::component::Component;
4-
use bevy_reflect::Reflect;
3+
use bevy_ecs::{component::Component, prelude::ReflectComponent};
4+
use bevy_reflect::{prelude::ReflectDefault, Reflect};
55
use bevy_transform::components::Transform;
66
use derive_more::derive::From;
77

@@ -13,13 +13,15 @@ use crate::{DynamicScene, Scene};
1313
/// Adding this component will spawn the scene as a child of that entity.
1414
/// Once it's spawned, the entity will have a [`SceneInstance`](crate::SceneInstance) component.
1515
#[derive(Component, Clone, Debug, Default, Deref, DerefMut, Reflect, PartialEq, Eq, From)]
16+
#[reflect(Component, Default, Debug, PartialEq)]
1617
#[require(Transform)]
1718
#[cfg_attr(feature = "bevy_render", require(Visibility))]
1819
pub struct SceneRoot(pub Handle<Scene>);
1920

2021
/// Adding this component will spawn the scene as a child of that entity.
2122
/// Once it's spawned, the entity will have a [`SceneInstance`](crate::SceneInstance) component.
2223
#[derive(Component, Clone, Debug, Default, Deref, DerefMut, Reflect, PartialEq, Eq, From)]
24+
#[reflect(Component, Default, Debug, PartialEq)]
2325
#[require(Transform)]
2426
#[cfg_attr(feature = "bevy_render", require(Visibility))]
2527
pub struct DynamicSceneRoot(pub Handle<DynamicScene>);

0 commit comments

Comments
 (0)