I have a system:
fn beep(world: &mut World) {
let type_registry = world.resource::<AppTypeRegistry>();
let scene = DynamicScene::from_world(world, type_registry);
let serialized_scene = scene.serialize_ron(type_registry).unwrap();
info!("{}", serialized_scene);
}
Which works fine. Then when i add this:
fn start_up(mut commands: Commands, mut clear_color: ResMut<ClearColor>) {
commands.spawn(Camera2dBundle::default());
clear_color.0 = Color::BLACK;
}
I get a crash: "no registration found for dynamic type with name bevy_math::rect::Rect". If i comment out the line where im spawning the camera, it works again.
Whats going on here? I'm feeling very dumb atm.
Also, if i dont want the whole world, do i just query for the entities and resources that i want, place them in an empty world, then serialize that instead?
And another thing...It appears the example in the git repo doesnt even serialize or save the resource? I would very much like to do that, please.