diff --git a/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs b/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs index 43e62934..552de153 100644 --- a/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs +++ b/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs @@ -89,7 +89,9 @@ public HashSet WriteFilesByClassTree(string outPath, bool separateAttr used.Add(type.Assembly); return used; }, - usedPartition => usedAssemblies.UnionWith(usedPartition) + usedPartition => { + lock (usedAssemblies) usedAssemblies.UnionWith(usedPartition); + } ); if (separateAttributes && usedAssemblies.Any())