diff --git a/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs b/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs index 750a9c88f..915e59fa7 100644 --- a/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs +++ b/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs @@ -144,8 +144,10 @@ static void OnCompilationFinished(string assemblyPath, CompilerMessage[] message HashSet dependencyPaths = GetDependecyPaths(assemblyPath); dependencyPaths.Add(Path.GetDirectoryName(mirrorRuntimeDll)); dependencyPaths.Add(Path.GetDirectoryName(unityEngineCoreModuleDLL)); + Log.WarningMethod = HandleWarning; + Log.ErrorMethod = HandleError; - if (Weaver.Process(assemblyPath, dependencyPaths.ToArray(), HandleWarning, HandleError)) + if (Weaver.WeaveAssembly(assemblyPath, dependencyPaths.ToArray())) { // NOTE: WeaveFailed is critical for unit tests but isn't used elsewhere WeaveFailed = false; diff --git a/Assets/Mirror/Editor/Weaver/Weaver.cs b/Assets/Mirror/Editor/Weaver/Weaver.cs index 32c8aed29..d1bab3f40 100644 --- a/Assets/Mirror/Editor/Weaver/Weaver.cs +++ b/Assets/Mirror/Editor/Weaver/Weaver.cs @@ -323,7 +323,7 @@ static bool Weave(string assName, IEnumerable dependencies) return true; } - static bool WeaveAssembly(string assembly, IEnumerable dependencies) + public static bool WeaveAssembly(string assembly, IEnumerable dependencies) { WeavingFailed = false; WeaveLists = new WeaverLists(); @@ -339,12 +339,5 @@ static bool WeaveAssembly(string assembly, IEnumerable dependencies) } } - - public static bool Process(string assembly, string[] extraAssemblyPaths, Action printWarning, Action printError) - { - Log.WarningMethod = printWarning; - Log.ErrorMethod = printError; - return WeaveAssembly(assembly, extraAssemblyPaths); - } } }