Skip to content

Commit

Permalink
Register RenderLayers type in CameraPlugin (#6308)
Browse files Browse the repository at this point in the history
# Objective

The `RenderLayers` type is never registered, making it unavailable for reflection.

## Solution

Register it in `CameraPlugin`, the same plugin that registers the related `Visibility*` types.
  • Loading branch information
SludgePhD committed Oct 19, 2022
1 parent 7db9b08 commit abbc0cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_render/src/camera/mod.rs
Expand Up @@ -10,7 +10,7 @@ pub use projection::*;
use crate::{
primitives::Aabb,
render_graph::RenderGraph,
view::{ComputedVisibility, Visibility, VisibleEntities},
view::{ComputedVisibility, RenderLayers, Visibility, VisibleEntities},
RenderApp, RenderStage,
};
use bevy_app::{App, Plugin};
Expand All @@ -30,6 +30,7 @@ impl Plugin for CameraPlugin {
.register_type::<ScalingMode>()
.register_type::<Aabb>()
.register_type::<CameraRenderGraph>()
.register_type::<RenderLayers>()
.add_plugin(CameraProjectionPlugin::<Projection>::default())
.add_plugin(CameraProjectionPlugin::<OrthographicProjection>::default())
.add_plugin(CameraProjectionPlugin::<PerspectiveProjection>::default());
Expand Down

0 comments on commit abbc0cf

Please sign in to comment.