diff --git a/assets/scene/load_scene_example.scn b/assets/scene/load_scene_example.scn index 7cb5237e5c..1d3c695c67 100644 --- a/assets/scene/load_scene_example.scn +++ b/assets/scene/load_scene_example.scn @@ -1,32 +1,26 @@ [ ( - entity: 2309003120, + entity: 3072676124, components: [ - ( - type: "Test", - data: ( - x: 3, - y: 4, - ), - ), - ( - type: "Foo", - data: ( - value: "hi", - ), - ), + { + "type": "load_scene::Test", + "x": 3.0, + "y": 4.0, + }, ], ), ( - entity: 4238063392, + entity: 3949176536, components: [ - ( - type: "Test", - data: ( - x: 3, - y: 4, - ), - ), + { + "type": "load_scene::Test", + "x": 1.0, + "y": 2.0, + }, + { + "type": "load_scene::Foo", + "value": "hello", + }, ], ), ] \ No newline at end of file diff --git a/crates/bevy_property/src/properties.rs b/crates/bevy_property/src/properties.rs index 97ff5221b8..8bd9b814a3 100644 --- a/crates/bevy_property/src/properties.rs +++ b/crates/bevy_property/src/properties.rs @@ -1,7 +1,7 @@ use crate::{DynamicProperties, Property, PropertyVal}; use serde::{ser::SerializeMap, Serialize}; -pub trait Properties { +pub trait Properties: Property { fn type_name(&self) -> &str; fn prop(&self, name: &str) -> Option<&dyn Property>; fn prop_mut(&mut self, name: &str) -> Option<&mut dyn Property>; @@ -63,11 +63,11 @@ impl
PropertiesVal for P
where
P: Properties,
{
- // #[inline]
+ #[inline]
fn prop_val(&self, serializer: S) -> Result(&self, serializer: S) -> Result(&self, serializer: S) -> Result(&self, serializer: S) -> Result(&self, serializer: S) -> Result(&self, serializer: S) -> Result