Expose methods to play scene from plugin code
This commit is contained in:
@ -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 = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user