Skip to content

Commit

Permalink
fix: Reduced log to warning if multiple navigation polygons are enabl…
Browse files Browse the repository at this point in the history
…ed while in editor

fixes godot-escoria/escoria-issues#103
  • Loading branch information
dploeger authored and StraToN committed Mar 14, 2022
1 parent e83b816 commit fdd61de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion addons/escoria-core/game/core-scripts/esc_terrain.gd
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,22 @@ 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()",
[
"Multiple NavigationPolygonInstances enabled " + \
"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

Expand Down

0 comments on commit fdd61de

Please sign in to comment.