diff options
author | Juan Linietsky <reduzio@gmail.com> | 2021-08-25 18:50:15 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-25 18:50:15 -0300 |
commit | 5b01a3b3be2c352caea9b024fc11b0eec950ad8a (patch) | |
tree | 1b107e03304d4efb0c43028c3966bdcaee98cea9 /doc | |
parent | ae3a4224271fa058fd8424c6142a2357bd7624b2 (diff) | |
parent | e2f8df8c5b3b6a1d4c18a75ff1c8293cc5909bc0 (diff) |
Merge pull request #52084 from reduz/engine-singleton-register
Add ability to register singletons from Engine API
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Engine.xml | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 886a18900e..8b399f64c9 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -84,11 +84,16 @@ </method> <method name="get_singleton" qualifiers="const"> <return type="Object" /> - <argument index="0" name="name" type="String" /> + <argument index="0" name="name" type="StringName" /> <description> Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments. </description> </method> + <method name="get_singleton_list" qualifiers="const"> + <return type="PackedStringArray" /> + <description> + </description> + </method> <method name="get_version_info" qualifiers="const"> <return type="Dictionary" /> <description> @@ -125,7 +130,7 @@ </method> <method name="has_singleton" qualifiers="const"> <return type="bool" /> - <argument index="0" name="name" type="String" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope. </description> @@ -136,6 +141,19 @@ Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop. </description> </method> + <method name="register_singleton"> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="instance" type="Object" /> + <description> + </description> + </method> + <method name="unregister_singleton"> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <description> + </description> + </method> </methods> <members> <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint" default="true"> |