summaryrefslogtreecommitdiff
path: root/scene/3d/baked_light_instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/baked_light_instance.cpp')
-rw-r--r--scene/3d/baked_light_instance.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp
index f85dfea80e..19be12ed91 100644
--- a/scene/3d/baked_light_instance.cpp
+++ b/scene/3d/baked_light_instance.cpp
@@ -1695,12 +1695,16 @@ void BakedLight::create_debug_mesh(DebugMode p_mode) {
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
mmi->set_multimesh(mm);
add_child(mmi);
+#ifdef TOOLS_ENABLED
if (get_tree()->get_edited_scene_root()==this){
mmi->set_owner(this);
} else {
mmi->set_owner(get_owner());
}
+#else
+ mmi->set_owner(get_owner());
+#endif
}