From 95a7f830c3868264ada6da82f564441726089b53 Mon Sep 17 00:00:00 2001 From: vis2k Date: Fri, 26 Mar 2021 19:34:37 +0800 Subject: [PATCH] add log for debugging if needed --- .../Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs index ffe00f35d..143a462e6 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs @@ -164,6 +164,10 @@ public static void InitializeReaderAndWriters(AssemblyDefinition currentAssembly // fill function body with reader/writer initializers ILProcessor worker = rwInitializer.Body.GetILProcessor(); + // for debugging: add a log to see if initialized on load + //worker.Emit(OpCodes.Ldstr, $"[InitReadWriters] called!"); + //worker.Emit(OpCodes.Call, WeaverTypes.logWarningReference); + Writers.InitializeWriters(worker); Readers.InitializeReaders(worker);