From fdd61de4d57e7f1bcfde32a396f94dcb7dab8ba6 Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Sat, 12 Mar 2022 20:30:48 +0100 Subject: [PATCH] fix: Reduced log to warning if multiple navigation polygons are enabled while in editor fixes godot-escoria/escoria-issues#103 --- addons/escoria-core/game/core-scripts/esc_terrain.gd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/escoria-core/game/core-scripts/esc_terrain.gd b/addons/escoria-core/game/core-scripts/esc_terrain.gd index 4f25897a..b4feeb1a 100644 --- a/addons/escoria-core/game/core-scripts/esc_terrain.gd +++ b/addons/escoria-core/game/core-scripts/esc_terrain.gd @@ -63,7 +63,7 @@ func _ready(): for n in get_children(): if n is NavigationPolygonInstance: if n.enabled: - if navigation_enabled_found: + if !Engine.is_editor_hint() and navigation_enabled_found: escoria.logger.report_errors( "ESCTerrain:_ready()", [ @@ -71,6 +71,14 @@ func _ready(): "at the same time." ] ) + elif Engine.is_editor_hint(): + escoria.logger.report_warnings( + "ESCTerrain:_ready()", + [ + "Multiple NavigationPolygonInstances enabled " + \ + "at the same time." + ] + ) navigation_enabled_found = true current_active_navigation_instance = n