mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkBehaviour.RegisterRpc/Command/EventDelegate made public for tests. internal won't work because they are called from outside assemblies like NetworkTransform. protected won't work because then we can't test them from the outside.
This commit is contained in:
parent
31af385a70
commit
e6cd2e2280
@ -392,19 +392,19 @@ protected static void RegisterDelegate(Type invokeClass, string cmdName, MirrorI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
protected static void RegisterCommandDelegate(Type invokeClass, string cmdName, CmdDelegate func)
|
public static void RegisterCommandDelegate(Type invokeClass, string cmdName, CmdDelegate func)
|
||||||
{
|
{
|
||||||
RegisterDelegate(invokeClass, cmdName, MirrorInvokeType.Command, func);
|
RegisterDelegate(invokeClass, cmdName, MirrorInvokeType.Command, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
protected static void RegisterRpcDelegate(Type invokeClass, string rpcName, CmdDelegate func)
|
public static void RegisterRpcDelegate(Type invokeClass, string rpcName, CmdDelegate func)
|
||||||
{
|
{
|
||||||
RegisterDelegate(invokeClass, rpcName, MirrorInvokeType.ClientRpc, func);
|
RegisterDelegate(invokeClass, rpcName, MirrorInvokeType.ClientRpc, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
protected static void RegisterEventDelegate(Type invokeClass, string eventName, CmdDelegate func)
|
public static void RegisterEventDelegate(Type invokeClass, string eventName, CmdDelegate func)
|
||||||
{
|
{
|
||||||
RegisterDelegate(invokeClass, eventName, MirrorInvokeType.SyncEvent, func);
|
RegisterDelegate(invokeClass, eventName, MirrorInvokeType.SyncEvent, func);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user