Skip to content

Commit 3fdb1c6

Browse files
zhaopjakobhellermann
authored andcommitted
Clone RenderLayers when necessary & change underlying type to usize
Addresses Bevy [13317](bevyengine/bevy#13317)
1 parent da13ade commit 3fdb1c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/bevy_editor_pls_default_windows/src/cameras/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::hierarchy::{HideInEditor, HierarchyWindow};
2020

2121
use self::camera_3d_panorbit::PanOrbitCamera;
2222

23-
pub const EDITOR_RENDER_LAYER: u8 = 19;
23+
pub const EDITOR_RENDER_LAYER: usize = 19;
2424

2525
// Present on all editor cameras
2626
#[derive(Component)]
@@ -234,7 +234,7 @@ fn spawn_editor_cameras(mut commands: Commands, editor: Res<Editor>) {
234234
Name::new("Editor Camera 3D Free"),
235235
NotInScene,
236236
GizmoCamera,
237-
render_layers,
237+
render_layers.clone(),
238238
));
239239

240240
commands.spawn((
@@ -257,7 +257,7 @@ fn spawn_editor_cameras(mut commands: Commands, editor: Res<Editor>) {
257257
Name::new("Editor Camera 3D Pan/Orbit"),
258258
NotInScene,
259259
GizmoCamera,
260-
render_layers,
260+
render_layers.clone(),
261261
));
262262

263263
commands.spawn((

crates/bevy_editor_pls_default_windows/src/gizmos.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn add_gizmo_markers(
191191
.entity(entity)
192192
.insert(HasGizmoMarker)
193193
.with_children(|commands| {
194-
commands.spawn((f(), render_layers, Name::new(name)));
194+
commands.spawn((f(), render_layers.clone(), Name::new(name)));
195195
});
196196
}
197197
}
@@ -231,7 +231,7 @@ fn add_gizmo_markers(
231231
material: gizmo_marker_meshes.camera_material.clone_weak(),
232232
..default()
233233
},
234-
render_layers,
234+
render_layers.clone(),
235235
Name::new("Camera Gizmo"),
236236
));
237237
});

0 commit comments

Comments
 (0)