13 lines
377 B
GDScript
13 lines
377 B
GDScript
@tool
|
|
extends EditorScenePostImport
|
|
|
|
func import_node_recursive(node : Node):
|
|
if node != null:
|
|
if node is StaticBody3D:
|
|
(node as StaticBody3D).collision_layer = 0b11
|
|
for child in node.get_children():
|
|
import_node_recursive(child)
|
|
|
|
func _post_import(scene: Node) -> Object:
|
|
import_node_recursive(scene)
|
|
return scene # Return the modified root node when you're done.
|