12 lines
345 B
GDScript3
12 lines
345 B
GDScript3
|
@tool
|
||
|
extends EditorScript
|
||
|
|
||
|
func _run():
|
||
|
for tile: Node in get_scene().get_children():
|
||
|
var nav_mesh: MeshInstance3D = tile.find_child("%s Nav" % [tile.name])
|
||
|
nav_mesh.visible = false
|
||
|
|
||
|
var nav_region: NavigationRegion3D = tile.find_child("NavigationRegion3D")
|
||
|
nav_region.navigation_mesh.duplicate()
|
||
|
nav_region.bake_navigation_mesh()
|