修复 DOTSCompilerGenerated和BurstCompile判定没有用于method的bug
parent
94b9b7ee2f
commit
468ea6a343
|
@ -142,7 +142,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (typeDef.CustomAttributes.Find("Unity.Jobs.DOTSCompilerGeneratedAttribute") != null)
|
if (MetaUtil.HasDOTSCompilerGeneratedAttribute(typeDef))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -221,9 +221,9 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (MetaUtil.HasBurstCompileAttribute(methodDef))
|
if (MetaUtil.HasBurstCompileAttribute(methodDef) || MetaUtil.HasDOTSCompilerGeneratedAttribute(methodDef))
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -239,6 +239,10 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (MetaUtil.HasBurstCompileAttribute(fieldDef) || MetaUtil.HasDOTSCompilerGeneratedAttribute(fieldDef))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -989,5 +989,10 @@ namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
return obj.CustomAttributes.Find("Unity.Burst.BurstCompileAttribute") != null;
|
return obj.CustomAttributes.Find("Unity.Burst.BurstCompileAttribute") != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool HasDOTSCompilerGeneratedAttribute(IHasCustomAttribute obj)
|
||||||
|
{
|
||||||
|
return obj.CustomAttributes.Find("Unity.Jobs.DOTSCompilerGeneratedAttribute") != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue