Merge pull request #101784 from ecosky/scene_debugger_fix

Scene debugger fix for remote debugging without editor running
This commit is contained in:
Thaddeus Crews 2025-01-21 11:55:20 -06:00
commit 3e91b9d748
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -1547,6 +1547,7 @@ void RuntimeNodeSelect::_select_node(Node *p_node) {
selected_node = p_node;
if (sbox_3d_mesh.is_valid()) {
sbox_3d_instance = RS::get_singleton()->instance_create2(sbox_3d_mesh->get_rid(), node_3d->get_world_3d()->get_scenario());
sbox_3d_instance_ofs = RS::get_singleton()->instance_create2(sbox_3d_mesh->get_rid(), node_3d->get_world_3d()->get_scenario());
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(sbox_3d_instance, RS::SHADOW_CASTING_SETTING_OFF);
@ -1555,7 +1556,9 @@ void RuntimeNodeSelect::_select_node(Node *p_node) {
RS::get_singleton()->instance_geometry_set_flag(sbox_3d_instance, RS::INSTANCE_FLAG_USE_BAKED_LIGHT, false);
RS::get_singleton()->instance_geometry_set_flag(sbox_3d_instance_ofs, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true);
RS::get_singleton()->instance_geometry_set_flag(sbox_3d_instance_ofs, RS::INSTANCE_FLAG_USE_BAKED_LIGHT, false);
}
if (sbox_3d_mesh_xray.is_valid()) {
sbox_3d_instance_xray = RS::get_singleton()->instance_create2(sbox_3d_mesh_xray->get_rid(), node_3d->get_world_3d()->get_scenario());
sbox_3d_instance_xray_ofs = RS::get_singleton()->instance_create2(sbox_3d_mesh_xray->get_rid(), node_3d->get_world_3d()->get_scenario());
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(sbox_3d_instance_xray, RS::SHADOW_CASTING_SETTING_OFF);
@ -1565,6 +1568,7 @@ void RuntimeNodeSelect::_select_node(Node *p_node) {
RS::get_singleton()->instance_geometry_set_flag(sbox_3d_instance_xray_ofs, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true);
RS::get_singleton()->instance_geometry_set_flag(sbox_3d_instance_xray_ofs, RS::INSTANCE_FLAG_USE_BAKED_LIGHT, false);
}
}
#endif // _3D_DISABLED
}