Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ulty | |
Old Version | Published before Godot 3 was released. |
I want to add some extra nodes to an object and automate it via the following editor script.
Getting the root node of the current scene works and I can change its name but adding child nodes does not. Any help would be welcome.
tool
extends EditorScript
func _run():
get_scene().set_name("test") # works
get_scene().add_child(Node.new()) # does nothing
This Node.new()
seems suspicious to me. Did you try it in the script from an existing scene?
Gokudomatic2 | 2016-04-15 09:40