summaryrefslogtreecommitdiffstats
path: root/core/config/engine.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-25 18:38:17 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-25 18:38:17 +0200
commit9750876d7ab1878c5062a87799e93adeb781286f (patch)
tree8936d81626affbffbfbf7b1b06958902ead46d03 /core/config/engine.h
parent82f6e9be5ea06bfef1adb315f15a409939b4a100 (diff)
parent4cdbbfd071924d7ac9ea708819fa71be4a6a8d21 (diff)
downloadredot-engine-9750876d7ab1878c5062a87799e93adeb781286f.tar.gz
Merge pull request #80962 from YuriSizov/godot-the-editor-engine
Differentiate between core and editor-only singletons
Diffstat (limited to 'core/config/engine.h')
-rw-r--r--core/config/engine.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/config/engine.h b/core/config/engine.h
index ff88fbc787..8184496597 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -44,8 +44,11 @@ public:
struct Singleton {
StringName name;
Object *ptr = nullptr;
- StringName class_name; //used for binding generation hinting
+ StringName class_name; // Used for binding generation hinting.
+ // Singleton scope flags.
bool user_created = false;
+ bool editor_only = false;
+
Singleton(const StringName &p_name = StringName(), Object *p_ptr = nullptr, const StringName &p_class_name = StringName());
};
@@ -129,6 +132,7 @@ public:
Object *get_singleton_object(const StringName &p_name) const;
void remove_singleton(const StringName &p_name);
bool is_singleton_user_created(const StringName &p_name) const;
+ bool is_singleton_editor_only(const StringName &p_name) const;
#ifdef TOOLS_ENABLED
_FORCE_INLINE_ void set_editor_hint(bool p_enabled) { editor_hint = p_enabled; }