Fix compilation regression

This commit is contained in:
Wojtek Figat
2023-11-14 12:15:51 +01:00
parent 0360f7786d
commit 6fd34bf5cc
2 changed files with 14 additions and 1 deletions

View File

@@ -6,7 +6,8 @@
#include "Engine/Core/Config/PlatformSettingsBase.h"
#include "Engine/Scripting/SoftObjectReference.h"
#include "Engine/Content/Assets/Texture.h"
class Texture;
/// <summary>
/// Android platform settings.

View File

@@ -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<class Texture>)
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;
}