Fix API_AUTO_SERIALZIATION usage if base type is not serializable

This commit is contained in:
Wojtek Figat
2021-04-22 10:58:01 +02:00
parent 480783b7fa
commit 2f1aeb6897

View File

@@ -1091,6 +1091,8 @@ namespace Flax.Build.Bindings
var baseType = classInfo?.BaseType ?? structureInfo?.BaseType;
if (classInfo != null && classInfo.IsBaseTypeHidden)
baseType = null;
if (baseType != null && (baseType.Type == "PersistentScriptingObject" || baseType.Type == "ScriptingObject"))
baseType = null;
CppAutoSerializeFields.Clear();
CppAutoSerializeProperties.Clear();
CppIncludeFiles.Add("Engine/Serialization/Serialization.h");