diff --git a/Source/Engine/Platform/Android/AndroidPlatformSettings.h b/Source/Engine/Platform/Android/AndroidPlatformSettings.h index d5e7190f2..9cfe7f880 100644 --- a/Source/Engine/Platform/Android/AndroidPlatformSettings.h +++ b/Source/Engine/Platform/Android/AndroidPlatformSettings.h @@ -6,7 +6,8 @@ #include "Engine/Core/Config/PlatformSettingsBase.h" #include "Engine/Scripting/SoftObjectReference.h" -#include "Engine/Content/Assets/Texture.h" + +class Texture; /// /// Android platform settings. diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs index 10e4d5846..991ff196b 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs @@ -1793,6 +1793,18 @@ namespace Flax.Build.Bindings var apiTypeInfo = FindApiTypeInfo(buildData, typeInfo, caller); if (apiTypeInfo != null && apiTypeInfo.IsInterface) return true; + + // Add includes to properly compile bindings (eg. SoftObjectReference) + CppReferencesFiles.Add(apiTypeInfo?.File); + if (typeInfo.GenericArgs != null) + { + for (int i = 0; i < typeInfo.GenericArgs.Count; i++) + { + var t = FindApiTypeInfo(buildData, typeInfo.GenericArgs[i], caller); + CppReferencesFiles.Add(t?.File); + } + } + return false; }