diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-06 18:13:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 18:13:23 +0200 |
commit | f8c066e97eec9c936d5e809328144d7af21acd0d (patch) | |
tree | 728fb622371fa839b7c09bee7da677d7b72297db /editor/editor_run.cpp | |
parent | a535b9160dbbcfad1884ff4a147672a0eb366a9d (diff) | |
parent | 49f6dc5004931f17a7be008b2159cd5915cd897d (diff) |
Merge pull request #37619 from pycbouh/expose-plugin-run-scene
Expose methods to play scenes from plugin code
Diffstat (limited to 'editor/editor_run.cpp')
-rw-r--r-- | editor/editor_run.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index 6a73e6c072..b49c50fa31 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -38,6 +38,10 @@ EditorRun::Status EditorRun::get_status() const { return status; } +String EditorRun::get_running_scene() const { + return running_scene; +} + Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints) { List<String> args; @@ -203,6 +207,9 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L } status = STATUS_PLAY; + if (p_scene != "") { + running_scene = p_scene; + } return OK; } @@ -231,8 +238,10 @@ void EditorRun::stop() { } status = STATUS_STOP; + running_scene = ""; } EditorRun::EditorRun() { status = STATUS_STOP; + running_scene = ""; } |