diff --git a/crates/bevy_editor_pls/src/lib.rs b/crates/bevy_editor_pls/src/lib.rs index 13c3db7..aeaddb9 100644 --- a/crates/bevy_editor_pls/src/lib.rs +++ b/crates/bevy_editor_pls/src/lib.rs @@ -85,7 +85,7 @@ impl Plugin for EditorPlugin { if window.title == "Bevy App" { window.title = "bevy_editor_pls".into(); } - let entity = app.world.spawn(window); + let entity = app.world_mut().spawn(window); WindowRef::Entity(entity.id()) } EditorWindowPlacement::Window(entity) => WindowRef::Entity(entity), @@ -136,7 +136,7 @@ impl Plugin for EditorPlugin { app.insert_resource(controls::EditorControls::default_bindings()) .add_systems(Update, controls::editor_controls_system); - let mut internal_state = app.world.resource_mut::(); + let mut internal_state = app.world_mut().resource_mut::(); let [game, _inspector] = internal_state.split_right::(egui_dock::NodeIndex::root(), 0.75); diff --git a/crates/bevy_editor_pls_core/src/lib.rs b/crates/bevy_editor_pls_core/src/lib.rs index 4b91e5a..755026c 100644 --- a/crates/bevy_editor_pls_core/src/lib.rs +++ b/crates/bevy_editor_pls_core/src/lib.rs @@ -39,7 +39,7 @@ impl Plugin for WindowSetupPlugin { impl AddEditorWindow for App { fn add_editor_window(&mut self) -> &mut Self { - let mut editor = self.world.get_resource_mut::().expect("Editor resource missing. Make sure to add the `EditorPlugin` before calling `app.add_editor_window`."); + let mut editor = self.world_mut().get_resource_mut::().expect("Editor resource missing. Make sure to add the `EditorPlugin` before calling `app.add_editor_window`."); editor.add_window::(); self.add_plugins(WindowSetupPlugin::(PhantomData)); @@ -69,9 +69,9 @@ impl Plugin for EditorPlugin { let (window_entity, always_active) = match self.window { WindowRef::Primary => { let entity = app - .world + .world_mut() .query_filtered::>() - .single(&app.world); + .single(&app.world()); (entity, false) } WindowRef::Entity(entity) => (entity, true), diff --git a/crates/bevy_editor_pls_default_windows/src/debug_settings/debugdump.rs b/crates/bevy_editor_pls_default_windows/src/debug_settings/debugdump.rs index 509999d..a870dd1 100644 --- a/crates/bevy_editor_pls_default_windows/src/debug_settings/debugdump.rs +++ b/crates/bevy_editor_pls_default_windows/src/debug_settings/debugdump.rs @@ -24,7 +24,7 @@ pub fn setup(app: &mut App) { return; } }; - let render_graph = render_app.world.get_resource::().unwrap(); + let render_graph = render_app.world().get_resource::().unwrap(); let schedule_settings = schedule_graph::settings::Settings { include_system: Some(Box::new(|system| { @@ -35,18 +35,18 @@ pub fn setup(app: &mut App) { let rendergraph_settings = render_graph::settings::Settings::default(); let update_schedule = app.get_schedule(Update).map(|schedule| { - schedule_graph::schedule_graph_dot(schedule, &app.world, &schedule_settings) + schedule_graph::schedule_graph_dot(schedule, &app.world(), &schedule_settings) }); let fixed_update_schedule = app.get_schedule(FixedUpdate).map(|schedule| { - schedule_graph::schedule_graph_dot(schedule, &app.world, &schedule_settings) + schedule_graph::schedule_graph_dot(schedule, &app.world(), &schedule_settings) }); let render_main_schedule = render_app.get_schedule(Render).map(|schedule| { - schedule_graph::schedule_graph_dot(schedule, &app.world, &schedule_settings) + schedule_graph::schedule_graph_dot(schedule, &app.world(), &schedule_settings) }); let render_extract_schedule = render_app.get_schedule(ExtractSchedule).map(|schedule| { - schedule_graph::schedule_graph_dot(schedule, &app.world, &schedule_settings) + schedule_graph::schedule_graph_dot(schedule, &app.world(), &schedule_settings) }); let render_graph = render_graph::render_graph_dot(render_graph, &rendergraph_settings); diff --git a/crates/bevy_editor_pls_default_windows/src/gizmos.rs b/crates/bevy_editor_pls_default_windows/src/gizmos.rs index 2938b14..3943d3c 100644 --- a/crates/bevy_editor_pls_default_windows/src/gizmos.rs +++ b/crates/bevy_editor_pls_default_windows/src/gizmos.rs @@ -117,7 +117,7 @@ impl EditorWindow for GizmoWindow { } fn app_setup(app: &mut App) { - let mut materials = app.world.resource_mut::>(); + let mut materials = app.world_mut().resource_mut::>(); let material_light = materials.add(StandardMaterial { base_color: Color::rgba_u8(222, 208, 103, 255), unlit: true, @@ -133,10 +133,10 @@ impl EditorWindow for GizmoWindow { ..default() }); - let mut meshes = app.world.resource_mut::>(); + let mut meshes = app.world_mut().resource_mut::>(); let sphere = meshes.add(Sphere { radius: 0.3 }); - app.world.insert_resource(GizmoMarkerConfig { + app.world_mut().insert_resource(GizmoMarkerConfig { point_light_mesh: sphere.clone(), point_light_material: material_light.clone(), directional_light_mesh: sphere.clone(),