Skip to content

Commit

Permalink
Fix removing children on undoing "Setup navigation"
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Dec 21, 2024
1 parent c47803f commit 8674125
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions project/addons/terrain_3d/src/baker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,8 @@ func _undo_set_up_navigation(p_nav_region: NavigationRegion3D, p_terrain: Terrai
var index: int = p_nav_region.get_index()
var t_owner: Node = p_nav_region.get_owner()

p_terrain.reparent(parent)
parent.remove_child(p_nav_region)
p_nav_region.remove_child(p_terrain)

parent.add_child(p_terrain, true)
parent.move_child(p_terrain, index)

p_terrain.owner = t_owner

0 comments on commit 8674125

Please sign in to comment.