#include "editor_run_script.h" #include "editor_node.h" void EditorScript::add_root_node(Node *p_node) { if (!editor) { EditorNode::add_io_error(TTR("EditorScript::add_root_node : Write your logic in the _run() method.")); return; } if (editor->get_edited_scene()) { EditorNode::add_io_error(TTR("EditorScript::add_root_node : There is an edited scene already.")); return; } // editor->set_edited_scene(p_node); } Node *EditorScript::get_scene() { if (!editor) { EditorNode::add_io_error(TTR("EditorScript::get_scene : Write your logic in the _run() method.")); return NULL; } return editor->get_edited_scene(); } void EditorScript::_run() { Ref