Skip to content

Commit

Permalink
fix: added new read/write symbol params (#806)
Browse files Browse the repository at this point in the history
fix: added new read/write symbol params
  • Loading branch information
c6burns authored and paulpach committed Apr 12, 2019
1 parent 3f9045d commit 3a50ca6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/Mirror/Editor/Weaver/Weaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static bool CheckSyncList(TypeDefinition td)
static bool Weave(string assName, IEnumerable<string> 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());
Expand Down Expand Up @@ -624,13 +624,14 @@ static bool Weave(string assName, IEnumerable<string> 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);
}
}
}
Expand Down

0 comments on commit 3a50ca6

Please sign in to comment.