diff options
author | reduz <reduzio@gmail.com> | 2021-08-24 19:03:10 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-08-25 08:32:25 -0300 |
commit | e2f8df8c5b3b6a1d4c18a75ff1c8293cc5909bc0 (patch) | |
tree | a85c182dce309f35dcf3da83349a688c644fd5a4 /core/core_bind.h | |
parent | ca7f53dd25cd7ee52004a09d4b7ababb9fa0bca6 (diff) |
Add ability to register singletons from engine API
* Exposed functions in Engine to register and unregister singletons.
* Added the concept of user singletons, which can be removed (the system ones can't).
Diffstat (limited to 'core/core_bind.h')
-rw-r--r-- | core/core_bind.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/core_bind.h b/core/core_bind.h index 1dbe49f418..a6fac63edd 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -639,8 +639,11 @@ public: bool is_in_physics_frame() const; - bool has_singleton(const String &p_name) const; - Object *get_singleton_object(const String &p_name) const; + bool has_singleton(const StringName &p_name) const; + Object *get_singleton_object(const StringName &p_name) const; + void register_singleton(const StringName &p_name, Object *p_object); + void unregister_singleton(const StringName &p_name); + Vector<String> get_singleton_list() const; void set_editor_hint(bool p_enabled); bool is_editor_hint() const; |