What is the proper way to serialize Nodes? #12700
-
I am looking for the proper way to save my UIs as a RON file. ...
let mut component_b = ComponentB::from_world(world);
component_b.value = "hello".to_string();
scene_world.spawn((
component_b,
ComponentA { x: 1.0, y: 2.0 },
Transform::IDENTITY,
Name::new("joe"),
));
scene_world.spawn(ComponentA { x: 3.0, y: 4.0 });
scene_world.insert_resource(ResourceA { score: 1 });
scene_world.spawn(NodeBundle::default()); // I added this.
... It did compile, but when I ran it, it panicked with message "called |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sounds like something in app.register_type::<NonZeroU16>(); Note that in 0.14 this won't need to be done manually anymore as we will have recursive registration (#5781). |
Beta Was this translation helpful? Give feedback.
Sounds like something in
NodeBundle
usesNonZeroU16
, and it's saying that it's not currently registered. Try registering it like:Note that in 0.14 this won't need to be done manually anymore as we will have recursive registration (#5781).