From 0b24c501617bd333b3bacac6bf65aca0da1c690e Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 21 Jan 2025 10:18:57 +0100 Subject: [PATCH] Expose `ContentDeprecated` to scripting (editor-only) --- Source/Engine/Content/Deprecated.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Engine/Content/Deprecated.h b/Source/Engine/Content/Deprecated.h index 92cd3aa44..bb4a6fa40 100644 --- a/Source/Engine/Content/Deprecated.h +++ b/Source/Engine/Content/Deprecated.h @@ -6,14 +6,16 @@ #if USE_EDITOR -// Utility for marking content as deprecated when loading it in Editor. Used to auto-upgrade (by resaving) data during development in editor or during game cooking. -class FLAXENGINE_API ContentDeprecated +// Editor-only utility for marking content as deprecated during load. Used to auto-upgrade (by resaving) data during development in editor or during game cooking. +API_CLASS(Static) class FLAXENGINE_API ContentDeprecated { + DECLARE_SCRIPTING_TYPE_MINIMAL(ContentDeprecated); + public: // Marks content as deprecated (for the current thread). - static void Mark(); + API_FUNCTION() static void Mark(); // Reads and clears deprecation flag (for the current thread). - static bool Clear(bool newValue = false); + API_FUNCTION() static bool Clear(bool newValue = false); }; // Marks content as deprecated (for the current thread).