From 07eb8f38046ca2eaf8bf0ca87e0b769aaaf37c39 Mon Sep 17 00:00:00 2001 From: Filip Henningsson Date: Mon, 25 Nov 2024 15:11:07 +0100 Subject: [PATCH] Debug visuals now inherit layers from DebugRenderManager --- AGXUnity/Rendering/ShapeDebugRenderData.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AGXUnity/Rendering/ShapeDebugRenderData.cs b/AGXUnity/Rendering/ShapeDebugRenderData.cs index dbe638ed..f497a8c4 100644 --- a/AGXUnity/Rendering/ShapeDebugRenderData.cs +++ b/AGXUnity/Rendering/ShapeDebugRenderData.cs @@ -121,6 +121,9 @@ public override void Synchronize( DebugRenderManager manager ) if ( Node == null ) return; + Node.layer = manager.gameObject.layer; + Node.TraverseChildren( x => x.layer = manager.gameObject.layer ); + // Node created - set properties and extra components. if ( nodeCreated ) { Node.hideFlags = HideFlags.DontSave;