fix: Reduced log to warning if multiple navigation polygons are enabled while in editor

fixes godot-escoria/escoria-issues#103
This commit is contained in:
Dennis Ploeger authored and Julian Murgia committed 2022-03-14 22:38:36 +01:00
1 parent e83b8161d0
commit fdd61de4d5
1 file changed
+9 -1
@@ -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