Skip to content

Commit

Permalink
Fix navmesh not saving bakes to external files
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Dec 1, 2023
1 parent 4c099cd commit 7cc07cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions project/addons/terrain_3d/editor/components/baker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ func _bake_nav_region_nav_mesh(p_nav_region: NavigationRegion3D) -> void:
p_nav_region.set_navigation_mesh(null)
p_nav_region.set_navigation_mesh(nav_mesh)

# Trigger save to disk if it is saved as an external file
if not nav_mesh.get_path().is_empty():
ResourceSaver.save(nav_mesh, nav_mesh.get_path(), ResourceSaver.FLAG_COMPRESS)

# Let other editor plugins and tool scripts know the nav mesh was just baked:
p_nav_region.bake_finished.emit()

Expand Down

0 comments on commit 7cc07cb

Please sign in to comment.