From 90549f57cd1d69a175ea5d66130c0f10f0458929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Fam=C3=A0?= Date: Sat, 15 Jul 2023 12:29:54 +0200 Subject: [PATCH] Exclude WAAPI Interface Registration on Unsupported Platforms Update the code to prevent the registration of the WAAPI interface to ClassDB on iOS, Android, and Linux platforms. This modification ensures that the interface is only registered on supported platforms, --- addons/Wwise/native/src/register_types.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/Wwise/native/src/register_types.cpp b/addons/Wwise/native/src/register_types.cpp index 3f9d7014..faa4ff59 100644 --- a/addons/Wwise/native/src/register_types.cpp +++ b/addons/Wwise/native/src/register_types.cpp @@ -9,12 +9,14 @@ static AkUtils* ak_utils; void register_wwise_types(ModuleInitializationLevel p_level) { +#if !defined(AK_IOS) && !defined(AK_ANDROID) && !defined(AK_LINUX) if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { ClassDB::register_class(); waapi_module = memnew(Waapi); Engine::get_singleton()->register_singleton("Waapi", Waapi::get_singleton()); } +#endif if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { @@ -57,6 +59,14 @@ void unregister_wwise_types(ModuleInitializationLevel p_level) memdelete(wwise_settings); memdelete(ak_utils); } + +#if !defined(AK_IOS) && !defined(AK_ANDROID) && !defined(AK_LINUX) + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) + { + Engine::get_singleton()->unregister_singleton("Waapi"); + memdelete(waapi_module); + } +#endif } extern "C"