[fix] 修复`Generate/LinkXml`生成的link.xml中对UnityEngine.Debug preserve all导致在Unity 2023及更高版本的iOS、visionOS等平台上出现Undefined symbols for architecture arm64: "CheckApplicationIntegrity(IntegrityCheckLevel)" 编译错误的问题。此bug由Unity引起,但通过在生成link.xml时忽略UnityEngine.Debug类来临时解决这个问题

main
walon 2024-06-13 22:04:35 +08:00
parent 360ba38805
commit b4b486944c
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ namespace HybridCLR.Editor.Link
assTypeNames.Sort(string.CompareOrdinal); assTypeNames.Sort(string.CompareOrdinal);
foreach(var typeName in assTypeNames) foreach(var typeName in assTypeNames)
{ {
#if UNITY_2023_1_OR_NEWER
if (typeName == "UnityEngine.Debug")
{
continue;
}
#endif
writer.WriteStartElement("type"); writer.WriteStartElement("type");
writer.WriteAttributeString("fullname", typeName); writer.WriteAttributeString("fullname", typeName);
writer.WriteAttributeString("preserve", "all"); writer.WriteAttributeString("preserve", "all");