Skip to content

Commit 4044aca

Browse files
committed
Reflect for debug renderer
1 parent 38e1b79 commit 4044aca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/render/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ impl RapierDebugRenderPlugin {
7474
}
7575

7676
/// Context to control some aspect of the debug-renderer after initialization.
77-
#[derive(Resource)]
77+
#[derive(Resource, Reflect, FromReflect)]
78+
#[reflect(Resource)]
7879
pub struct DebugRenderContext {
7980
/// Is the debug-rendering currently enabled?
8081
pub enabled: bool,
8182
/// Pipeline responsible for rendering. Access `pipeline.mode` and `pipeline.style`
8283
/// to modify the set of rendered elements, and modify the default coloring rules.
84+
#[reflect(ignore)]
8385
pub pipeline: DebugRenderPipeline,
8486
/// Are the debug-lines always rendered on top of other primitives?
8587
pub always_on_top: bool,
@@ -97,6 +99,8 @@ impl Default for DebugRenderContext {
9799

98100
impl Plugin for RapierDebugRenderPlugin {
99101
fn build(&self, app: &mut App) {
102+
app.register_type::<DebugRenderContext>();
103+
100104
app.add_plugin(lines::DebugLinesPlugin::always_on_top(self.always_on_top))
101105
.insert_resource(DebugRenderContext {
102106
enabled: self.enabled,

0 commit comments

Comments
 (0)