diff --git a/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs index 88543e0be..2a919d273 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs @@ -31,13 +31,13 @@ public static bool Process(AssemblyDefinition CurrentAssembly, IAssemblyResolver return ProcessAssemblyClasses(CurrentAssembly, CurrentAssembly, writers, readers, ref WeavingFailed); } + // look for assembly instead of relying on CurrentAssembly.MainModule. + // fixes: https://github.com/MirrorNetworking/Mirror/issues/3816 static List FindProcessTargetAssemblies(AssemblyDefinition assembly, IAssemblyResolver resolver) { HashSet processedAssemblies = new HashSet(); List assemblies = new List(); - ProcessAssembly(assembly); - return assemblies; void ProcessAssembly(AssemblyDefinition current)