mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkBehaviour: removed GetCmdHashHandlerName which was used by NetworkIdentity.HandleRemoteCall. This function made not much sense because if the function with that hash couldn't be invoked then the function's name won't be found to display for the error message anyway.
This commit is contained in:
parent
4ae6d21418
commit
bd0558924e
@ -259,16 +259,6 @@ internal bool InvokeHandlerDelegate(int cmdHash, UNetInvokeType invokeType, Netw
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string GetCmdHashHandlerName(int cmdHash)
|
|
||||||
{
|
|
||||||
Invoker invoker;
|
|
||||||
if (s_CmdHandlerDelegates.TryGetValue(cmdHash, out invoker))
|
|
||||||
{
|
|
||||||
return invoker.invokeType + ":" + invoker.invokeFunction.GetMethodName();
|
|
||||||
}
|
|
||||||
return cmdHash.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------- Helpers --------------------------------
|
// ----------------------------- Helpers --------------------------------
|
||||||
|
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
@ -560,8 +560,7 @@ internal void HandleRemoteCall(int componentIndex, int functionHash, UNetInvokeT
|
|||||||
{
|
{
|
||||||
if (gameObject == null)
|
if (gameObject == null)
|
||||||
{
|
{
|
||||||
string functionName = NetworkBehaviour.GetCmdHashHandlerName(functionHash);
|
Debug.LogWarning(invokeType + " [" + functionHash + "] received for deleted object [netId=" + netId + "]");
|
||||||
Debug.LogWarning(invokeType + " [" + functionName + "] received for deleted object [netId=" + netId + "]");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,8 +570,7 @@ internal void HandleRemoteCall(int componentIndex, int functionHash, UNetInvokeT
|
|||||||
NetworkBehaviour invokeComponent = m_NetworkBehaviours[componentIndex];
|
NetworkBehaviour invokeComponent = m_NetworkBehaviours[componentIndex];
|
||||||
if (!invokeComponent.InvokeHandlerDelegate(functionHash, invokeType, reader))
|
if (!invokeComponent.InvokeHandlerDelegate(functionHash, invokeType, reader))
|
||||||
{
|
{
|
||||||
string functionName = NetworkBehaviour.GetCmdHashHandlerName(functionHash);
|
Debug.LogError("Found no receiver for incoming " + invokeType + " [" + functionHash + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "].");
|
||||||
Debug.LogError("Found no receiver for incoming [" + functionName + "] on " + gameObject + ", the server and client should have the same NetworkBehaviour instances [netId=" + netId + "].");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user