diff --git a/Assets/Mirror/Editor/Weaver/Weaver.cs b/Assets/Mirror/Editor/Weaver/Weaver.cs index b567e5bf0..d8452dac8 100644 --- a/Assets/Mirror/Editor/Weaver/Weaver.cs +++ b/Assets/Mirror/Editor/Weaver/Weaver.cs @@ -544,7 +544,7 @@ static bool CheckSyncList(TypeDefinition td) static bool Weave(string assName, IEnumerable dependencies, IAssemblyResolver assemblyResolver, string unityEngineDLLPath, string mirrorNetDLLPath, string outputDir) { using (DefaultAssemblyResolver asmResolver = new DefaultAssemblyResolver()) - using (CurrentAssembly = AssemblyDefinition.ReadAssembly(assName, new ReaderParameters { ReadWrite = true, AssemblyResolver = asmResolver })) + using (CurrentAssembly = AssemblyDefinition.ReadAssembly(assName, new ReaderParameters { ReadWrite = true, ReadSymbols = true, AssemblyResolver = asmResolver })) { asmResolver.AddSearchDirectory(Path.GetDirectoryName(assName)); asmResolver.AddSearchDirectory(Helpers.UnityEngineDLLDirectoryName()); @@ -624,13 +624,14 @@ static bool Weave(string assName, IEnumerable dependencies, IAssemblyRes } // write to outputDir if specified, otherwise perform in-place write + WriterParameters writeParams = new WriterParameters { WriteSymbols = true }; if (outputDir != null) { - CurrentAssembly.Write(Helpers.DestinationFileFor(outputDir, assName)); + CurrentAssembly.Write(Helpers.DestinationFileFor(outputDir, assName), writeParams); } else { - CurrentAssembly.Write(); + CurrentAssembly.Write(writeParams); } } }