Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | websterek |
Hello
How can I Acces to Node Tree of EditorPlugin when I’m in other scene?
Right now I have something like this in my extension:
var dock = preload("res://addons/RoshamboManager/RoshamboPanel.tscn").instance()
var scene = get_tree().get_edited_scene_root()
Dock should be for accesing EditorPlugin and scene is for access to edited scene.
Now when I’m clicking in button with code like this:
func waves_editor():
dock.get_node("Waves_Editor").popup()
it’s ends with error:
res://addons/RoshamboManager/roshambo_manager.gd:484 - Invalid call.
Nonexistent function ‘get_node’ in base ‘Nil’.
But the same code works flawlessly when connected button is clicked with opened EditorPlugin scene.
How can i Solve that?