Skip to content

Commit a11ebec

Browse files
committed
[fix] fixe the bug that preserving UnityEngine.PerformanceReportingModule when generating link.xml would cause the Android app built with Unity 2019 to crash on startup.
1 parent 019412f commit a11ebec

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Editor/Link/Analyzer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ private void CollectUnityEngineCoreTypes(HashSet<ITypeDefOrRef> preservedTypes)
4343
var assCollector = new AssemblyCache(_resolver);
4444
foreach (string unityEngineDll in Directory.GetFiles(unityEngineDllPath, "UnityEngine.*.dll", SearchOption.AllDirectories))
4545
{
46+
// because of bug of unity 2019.4.x, preserving types in this dll will cause crash in android build
47+
if (unityEngineDll.EndsWith("UnityEngine.PerformanceReportingModule.dll", StringComparison.InvariantCulture))
48+
{
49+
continue;
50+
}
4651
ModuleDefMD mod = assCollector.LoadModuleFromFileWithoutCache(unityEngineDll);
4752
foreach (TypeDef type in mod.GetTypes())
4853
{

0 commit comments

Comments
 (0)