mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
simplify module weaving
This commit is contained in:
parent
e79ffeaa8e
commit
fdc21582db
@ -268,6 +268,10 @@ static bool WeaveModule(ModuleDefinition moduleDefinition)
|
||||
watch.Stop();
|
||||
Console.WriteLine("Weave behaviours and messages took" + watch.ElapsedMilliseconds + " milliseconds");
|
||||
|
||||
|
||||
if (modified)
|
||||
PropertySiteProcessor.Process(moduleDefinition);
|
||||
|
||||
return modified;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -312,22 +316,6 @@ static bool Weave(string assName, IEnumerable<string> dependencies, string unity
|
||||
|
||||
if (modified)
|
||||
{
|
||||
// this must be done for ALL code, not just NetworkBehaviours
|
||||
try
|
||||
{
|
||||
PropertySiteProcessor.Process(moduleDefinition);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("ProcessPropertySites exception: " + e);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (WeavingFailed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// write to outputDir if specified, otherwise perform in-place write
|
||||
WriterParameters writeParams = new WriterParameters { WriteSymbols = true };
|
||||
CurrentAssembly.Write(writeParams);
|
||||
|
Loading…
Reference in New Issue
Block a user