From 0254a408173f36ba194dc3b69543d85d66e832fa Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 25 Jul 2018 23:20:54 +0200 Subject: [PATCH] Add "editor" and "standalone" feature tags These feature tags can be used to check whether the project was started from an editor binary or from an export template binary. --- core/os/os.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/os/os.cpp b/core/os/os.cpp index 8dcf0990fc5..97dae05919a 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -577,6 +577,13 @@ bool OS::has_feature(const String &p_feature) { if (p_feature == "release") return true; #endif +#ifdef TOOLS_ENABLED + if (p_feature == "editor") + return true; +#else + if (p_feature == "standalone") + return true; +#endif if (sizeof(void *) == 8 && p_feature == "64") { return true;