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
2022-03-12 20:30:48 +01:00
committed by Julian Murgia
parent e83b8161d0
commit fdd61de4d5

View File

@@ -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