diff --git a/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs index 8519b7c9f..4f77b1450 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs @@ -144,8 +144,8 @@ public static bool ProcessMethodsValidateCommand(MethodDefinition md, CustomAttr } // validate - return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md, "Command") && - NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca, "Command"); + return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md) && + NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca); } } } diff --git a/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs index 800a7fdb7..f846b354e 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs @@ -642,7 +642,7 @@ public static void AddInvokeParameters(ICollection collecti collection.Add(new ParameterDefinition("reader", ParameterAttributes.None, Weaver.CurrentAssembly.MainModule.ImportReference(Weaver.NetworkReaderType))); } - public static bool ProcessMethodsValidateFunction(MethodReference md, string actionType) + public static bool ProcessMethodsValidateFunction(MethodReference md) { if (md.ReturnType.FullName == Weaver.IEnumeratorType.FullName) { @@ -662,7 +662,7 @@ public static bool ProcessMethodsValidateFunction(MethodReference md, string act return true; } - public static bool ProcessMethodsValidateParameters(MethodReference md, CustomAttribute ca, string actionType) + public static bool ProcessMethodsValidateParameters(MethodReference md, CustomAttribute ca) { for (int i = 0; i < md.Parameters.Count; ++i) { diff --git a/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs index 484b5e003..bdf58ef0d 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs @@ -101,8 +101,8 @@ public static bool ProcessMethodsValidateRpc(MethodDefinition md, CustomAttribut } // validate - return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md, "Rpc") && - NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca, "Rpc"); + return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md) && + NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca); } } } diff --git a/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs index 3bb8149c6..37b74a283 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs @@ -137,13 +137,13 @@ public static bool ProcessMethodsValidateTargetRpc(MethodDefinition md, CustomAt return false; } - if (!NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md, "Target Rpc")) + if (!NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md)) { return false; } // validate - return NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca, "Target Rpc"); + return NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca); } } }