mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
fix: added new read/write symbol params (#806)
fix: added new read/write symbol params
This commit is contained in:
parent
3f9045dbe8
commit
3a50ca6352
@ -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)
|
static bool Weave(string assName, IEnumerable<string> dependencies, IAssemblyResolver assemblyResolver, string unityEngineDLLPath, string mirrorNetDLLPath, string outputDir)
|
||||||
{
|
{
|
||||||
using (DefaultAssemblyResolver asmResolver = new DefaultAssemblyResolver())
|
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(Path.GetDirectoryName(assName));
|
||||||
asmResolver.AddSearchDirectory(Helpers.UnityEngineDLLDirectoryName());
|
asmResolver.AddSearchDirectory(Helpers.UnityEngineDLLDirectoryName());
|
||||||
@ -624,13 +624,14 @@ static bool Weave(string assName, IEnumerable<string> dependencies, IAssemblyRes
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write to outputDir if specified, otherwise perform in-place write
|
// write to outputDir if specified, otherwise perform in-place write
|
||||||
|
WriterParameters writeParams = new WriterParameters { WriteSymbols = true };
|
||||||
if (outputDir != null)
|
if (outputDir != null)
|
||||||
{
|
{
|
||||||
CurrentAssembly.Write(Helpers.DestinationFileFor(outputDir, assName));
|
CurrentAssembly.Write(Helpers.DestinationFileFor(outputDir, assName), writeParams);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CurrentAssembly.Write();
|
CurrentAssembly.Write(writeParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user