[fix] 修复WebGL一些桥接函数ABI计算的bug

main
walon 2023-04-22 14:05:50 +08:00
parent b8b990bfc1
commit 4c6dd1249a
1 changed files with 9 additions and 1 deletions

View File

@ -261,7 +261,15 @@ namespace HybridCLR.Editor.ABI
{ {
return true; return true;
} }
return fields.All(f => f.IsStatic); if (fields.All(f => f.IsStatic))
{
return true;
}
if (typeDef.IsExplicitLayout && fields.Count(f => !f.IsStatic) > 1)
{
return true;
}
return false;
} }
protected static TypeInfo CreateGeneralValueType(TypeSig type, int size, int aligment) protected static TypeInfo CreateGeneralValueType(TypeSig type, int size, int aligment)