Merge pull request #64147 from smix8/fix_navigationregion3d_debug_doublerender_4.x

Fix NavigationRegion3D debug mesh rendering twice in Editor
This commit is contained in:
Rémi Verschelde 2022-08-11 09:42:38 +02:00 committed by GitHub
commit e9e9e92e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,6 +363,12 @@ NavigationRegion3D::~NavigationRegion3D() {
#ifdef DEBUG_ENABLED
void NavigationRegion3D::_update_debug_mesh() {
if (Engine::get_singleton()->is_editor_hint()) {
// don't update inside Editor as node 3d gizmo takes care of this
// as collisions and selections for Editor Viewport need to be updated
return;
}
if (!NavigationServer3D::get_singleton()->get_debug_enabled()) {
if (debug_instance.is_valid()) {
RS::get_singleton()->instance_set_visible(debug_instance, false);