diff --git a/Mirror/Runtime/NetworkBehaviour.cs b/Mirror/Runtime/NetworkBehaviour.cs index a1508e840..ef837c232 100644 --- a/Mirror/Runtime/NetworkBehaviour.cs +++ b/Mirror/Runtime/NetworkBehaviour.cs @@ -259,7 +259,7 @@ static bool GetInvokerForHash(int cmdHash, UNetInvokeType invokeType, out Invoke return false; } - static bool GetInvokerFunctionForHash(int cmdHash, UNetInvokeType invokeType, out CmdDelegate invokeFunction) + internal static bool GetInvokerFunctionForHash(int cmdHash, UNetInvokeType invokeType, out CmdDelegate invokeFunction) { Invoker invoker; if (GetInvokerForHash(cmdHash, invokeType, out invoker)) @@ -271,22 +271,6 @@ static bool GetInvokerFunctionForHash(int cmdHash, UNetInvokeType invokeType, ou return false; } - // wrapper fucntions for each type of network operation - internal static bool GetInvokerForHashCommand(int cmdHash, out CmdDelegate invokeFunction) - { - return GetInvokerFunctionForHash(cmdHash, UNetInvokeType.Command, out invokeFunction); - } - - internal static bool GetInvokerForHashClientRpc(int cmdHash, out CmdDelegate invokeFunction) - { - return GetInvokerFunctionForHash(cmdHash, UNetInvokeType.ClientRpc, out invokeFunction); - } - - internal static bool GetInvokerForHashSyncEvent(int cmdHash, out CmdDelegate invokeFunction) - { - return GetInvokerFunctionForHash(cmdHash, UNetInvokeType.SyncEvent, out invokeFunction); - } - // InvokeCmd/Rpc/SyncEventDelegate can all use the same function here internal bool InvokeHandlerDelegateOfType(int cmdHash, UNetInvokeType invokeType, NetworkReader reader) { diff --git a/Mirror/Runtime/NetworkIdentity.cs b/Mirror/Runtime/NetworkIdentity.cs index 69b7ad3ff..70c47cf93 100644 --- a/Mirror/Runtime/NetworkIdentity.cs +++ b/Mirror/Runtime/NetworkIdentity.cs @@ -570,7 +570,7 @@ internal void HandleSyncEvent(int componentIndex, int cmdHash, NetworkReader rea // find the matching SyncEvent function and networkBehaviour class NetworkBehaviour.CmdDelegate invokeFunction; - bool invokeFound = NetworkBehaviour.GetInvokerForHashSyncEvent(cmdHash, out invokeFunction); + bool invokeFound = NetworkBehaviour.GetInvokerFunctionForHash(cmdHash, UNetInvokeType.SyncEvent, out invokeFunction); if (!invokeFound) { // We don't get a valid lookup of the command name when it doesn't exist... @@ -605,7 +605,7 @@ internal void HandleCommand(int componentIndex, int cmdHash, NetworkReader reade // find the matching Command function and networkBehaviour class NetworkBehaviour.CmdDelegate invokeFunction; - bool invokeFound = NetworkBehaviour.GetInvokerForHashCommand(cmdHash, out invokeFunction); + bool invokeFound = NetworkBehaviour.GetInvokerFunctionForHash(cmdHash, UNetInvokeType.Command, out invokeFunction); if (!invokeFound) { // We don't get a valid lookup of the command name when it doesn't exist... @@ -640,7 +640,7 @@ internal void HandleRPC(int componentIndex, int cmdHash, NetworkReader reader) // find the matching ClientRpc function and networkBehaviour class NetworkBehaviour.CmdDelegate invokeFunction; - bool invokeFound = NetworkBehaviour.GetInvokerForHashClientRpc(cmdHash, out invokeFunction); + bool invokeFound = NetworkBehaviour.GetInvokerFunctionForHash(cmdHash, UNetInvokeType.ClientRpc, out invokeFunction); if (!invokeFound) { // We don't get a valid lookup of the command name when it doesn't exist...