From 63bf0834670e97505b5f95439b601ebf7d2b2aac Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 2 Feb 2024 08:47:05 +0100 Subject: [PATCH] feat: added GDEDITORONLY and GDGAMEONLY --- godot_macros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/godot_macros.h b/godot_macros.h index 708ea53..699162c 100644 --- a/godot_macros.h +++ b/godot_macros.h @@ -28,4 +28,7 @@ #define GDRESOURCETYPE(_Class) vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, #_Class) +#define GDEDITORONLY() if(!Engine::get_singleton()->is_editor_hint()) return +#define GDGAMEONLY() if(Engine::get_singleton()->is_editor_hint()) return + #endif // !UC_GODOT_MACROS_H