Expose methods to play scene from plugin code

(cherry picked from commit 49f6dc5004)
This commit is contained in:
Yuri Sizov
2020-04-05 17:19:24 +03:00
committed by Rémi Verschelde
parent a8d4ca0e1b
commit 2b4773f0cf
7 changed files with 124 additions and 9 deletions

View File

@@ -72,6 +72,13 @@
Returns an [Array] with the file paths of the currently opened scenes.
</description>
</method>
<method name="get_playing_scene" qualifiers="const">
<return type="String">
</return>
<description>
Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string.
</description>
</method>
<method name="get_resource_filesystem">
<return type="EditorFileSystem">
</return>
@@ -117,6 +124,13 @@
Shows the given property on the given [code]object[/code] in the Editor's Inspector dock.
</description>
</method>
<method name="is_playing_scene" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code], if a scene is currently being played; [code]false[/code] otherwise. Paused scenes are considered as being played.
</description>
</method>
<method name="is_plugin_enabled" qualifiers="const">
<return type="bool">
</return>
@@ -146,6 +160,29 @@
Opens the scene at the given path.
</description>
</method>
<method name="play_current_scene">
<return type="void">
</return>
<description>
Plays the currently active scene.
</description>
</method>
<method name="play_custom_scene">
<return type="void">
</return>
<argument index="0" name="scene_filepath" type="String">
</argument>
<description>
Plays the scene specified by its filepath.
</description>
</method>
<method name="play_main_scene">
<return type="void">
</return>
<description>
Plays the main scene.
</description>
</method>
<method name="reload_scene_from_path">
<return type="void">
</return>
@@ -201,6 +238,13 @@
Sets the enabled status of a plugin. The plugin name is the same as its directory name.
</description>
</method>
<method name="stop_playing_scene">
<return type="void">
</return>
<description>
Stops the scene that is currently playing.
</description>
</method>
</methods>
<members>
<member name="distraction_free_mode" type="bool" setter="set_distraction_free_mode" getter="is_distraction_free_mode_enabled">