-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-ScenesSerialized ECS data stored on the diskSerialized ECS data stored on the diskC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Milestone
Description
Bevy version
0.9.0 main 688f13c
What you did
I attempted to serialize a scene using the following code:
fn save_scene(world: &mut World) {
for entity in world
.query_filtered::<Entity, With<Camera>>()
.iter(world)
.collect::<HashSet<_>>()
{
world.despawn(entity);
}
let type_registry = world.resource::<AppTypeRegistry>();
let scene = DynamicScene::from_world(world, type_registry);
let serialized = scene
.serialize_ron(type_registry)
.expect("Failed to serialize the world");
#[cfg(not(target_arch = "wasm32"))]
IoTaskPool::get()
.spawn(async move {
fs::write("assets/scenes/test.scn.ron", serialized.as_bytes())
.expect("Failed to write to file");
})
.detach();
}What went wrong
App panics and scene is not saved
Additional information
Logs
Failed to serialize the world: Message("no registration found for dynamic type with name bevy_render::view::visibility::ComputedVisibilityFlags")
I think it might be a result of #6305 but I am not certain.
Metadata
Metadata
Assignees
Labels
A-ScenesSerialized ECS data stored on the diskSerialized ECS data stored on the diskC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior