mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkBehaviour.ClearDelegates added for tests
This commit is contained in:
parent
ed9d056350
commit
31af385a70
@ -409,6 +409,13 @@ protected static void RegisterEventDelegate(Type invokeClass, string eventName,
|
||||
RegisterDelegate(invokeClass, eventName, MirrorInvokeType.SyncEvent, func);
|
||||
}
|
||||
|
||||
// we need a way to clean up delegates after tests
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
internal static void ClearDelegates()
|
||||
{
|
||||
cmdHandlerDelegates.Clear();
|
||||
}
|
||||
|
||||
static bool GetInvokerForHash(int cmdHash, MirrorInvokeType invokeType, out Invoker invoker)
|
||||
{
|
||||
if (cmdHandlerDelegates.TryGetValue(cmdHash, out invoker) &&
|
||||
|
Loading…
Reference in New Issue
Block a user