From 3db71376272576fa5a59b89f6402ae8bcf84e678 Mon Sep 17 00:00:00 2001 From: thepackett Date: Thu, 30 Nov 2023 14:05:59 -0600 Subject: [PATCH] Mention DynamicSceneBuilder in scene example (#10441) # Objective Make ```DynamicSceneBuilder``` more visible to new bevy learners! ```DynamicSceneBuilder``` is likely to be the most appropriate tool to use when creating dynamic scenes in all but the simplest scenarios. However, it's not mentioned in the scene example. This PR aims to fix this. ## Solution I've modified the comment above where the ```DynamicScene``` is created to note that ```DynamicSceneBuilder``` can also be used to create the scene. I believe this is the best approach to introduce ```DynamicSceneBuilder``` without adding additional complexity to the example. --- examples/scene/scene.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs index 7120fd419ff0ff..dac36e96d7fd41 100644 --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -118,7 +118,8 @@ fn save_scene_system(world: &mut World) { scene_world.spawn(ComponentA { x: 3.0, y: 4.0 }); scene_world.insert_resource(ResourceA { score: 1 }); - // With our sample world ready to go, we can now create our scene: + // With our sample world ready to go, we can now create our scene using DynamicScene or DynamicSceneBuilder. + // For simplicity, we will create our scene using DynamicScene: let scene = DynamicScene::from_world(&scene_world); // Scenes can be serialized like this: