diff --git a/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs index 9278dbfd5..cfa0b66c2 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs @@ -50,7 +50,7 @@ public static MethodDefinition ProcessCommandCall(TypeDefinition td, MethodDefin // local client check Instruction localClientLabel = cmdWorker.Create(OpCodes.Nop); cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0)); - cmdWorker.Append(cmdWorker.Create(OpCodes.Call, Weaver.UBehaviourIsServer)); + cmdWorker.Append(cmdWorker.Create(OpCodes.Call, Weaver.getBehaviourIsServer)); cmdWorker.Append(cmdWorker.Create(OpCodes.Brfalse, localClientLabel)); // call the cmd function directly. diff --git a/Assets/Mirror/Editor/Weaver/Weaver.cs b/Assets/Mirror/Editor/Weaver/Weaver.cs index 71a5193b4..47e315421 100644 --- a/Assets/Mirror/Editor/Weaver/Weaver.cs +++ b/Assets/Mirror/Editor/Weaver/Weaver.cs @@ -91,7 +91,7 @@ class Weaver public static MethodReference NetworkServerGetActive; public static MethodReference NetworkServerGetLocalClientActive; public static MethodReference NetworkClientGetActive; - public static MethodReference UBehaviourIsServer; + public static MethodReference getBehaviourIsServer; public static MethodReference NetworkReaderReadPackedUInt32; public static MethodReference NetworkReaderReadPackedUInt64; public static MethodReference NetworkWriterWritePackedUInt64; @@ -325,8 +325,8 @@ static void SetupTargetTypes() CurrentAssembly.MainModule.ImportReference(gameObjectType); CurrentAssembly.MainModule.ImportReference(transformType); - TypeReference netViewTmp = NetAssembly.MainModule.GetType("Mirror.NetworkIdentity"); - NetworkIdentityType = CurrentAssembly.MainModule.ImportReference(netViewTmp); + TypeReference networkIdentityTmp = NetAssembly.MainModule.GetType("Mirror.NetworkIdentity"); + NetworkIdentityType = CurrentAssembly.MainModule.ImportReference(networkIdentityTmp); NetworkBehaviourType = NetAssembly.MainModule.GetType("Mirror.NetworkBehaviour"); NetworkBehaviourType2 = CurrentAssembly.MainModule.ImportReference(NetworkBehaviourType); @@ -352,11 +352,11 @@ static void SetupTargetTypes() // get specialized GetComponent() getComponentReference = Resolvers.ResolveMethodGeneric(ComponentType, CurrentAssembly, "GetComponent", NetworkIdentityType); - getNetIdReference = Resolvers.ResolveMethod(netViewTmp, CurrentAssembly, "get_netId"); + getNetIdReference = Resolvers.ResolveMethod(networkIdentityTmp, CurrentAssembly, "get_netId"); gameObjectInequality = Resolvers.ResolveMethod(unityObjectType, CurrentAssembly, "op_Inequality"); - UBehaviourIsServer = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "get_isServer"); + getBehaviourIsServer = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "get_isServer"); setSyncVarReference = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "SetSyncVar"); setSyncVarHookGuard = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "set_syncVarHookGuard"); getSyncVarHookGuard = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "get_syncVarHookGuard");