Skip to content

Commit

Permalink
fix: method access exception with serverrpc that return something
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach committed Jan 2, 2021
1 parent 731d86f commit 8cb00e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Mirror/Runtime/RemoteCallHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal static int GetMethodHash(Type invokeClass, string methodName)
/// <param name="func"></param>
/// <param name="cmdRequireAuthority"></param>
/// <returns>remote function hash</returns>
internal static int RegisterDelegate(Type invokeClass, string cmdName, MirrorInvokeType invokerType, CmdDelegate func, bool cmdRequireAuthority = true)
public static int RegisterDelegate(Type invokeClass, string cmdName, MirrorInvokeType invokerType, CmdDelegate func, bool cmdRequireAuthority = true)
{
// type+func so Inventory.RpcUse != Equipment.RpcUse
int cmdHash = GetMethodHash(invokeClass, cmdName);
Expand All @@ -101,7 +101,7 @@ internal static int RegisterDelegate(Type invokeClass, string cmdName, MirrorInv
return cmdHash;
}

internal static void RegisterRequestDelegate<T>(Type invokeClass, string cmdName, RequestDelegate<T> func, bool cmdRequireAuthority = true)
public static void RegisterRequestDelegate<T>(Type invokeClass, string cmdName, RequestDelegate<T> func, bool cmdRequireAuthority = true)
{
async UniTaskVoid Wrapper(NetworkBehaviour obj, NetworkReader reader, INetworkConnection senderConnection, int replyId)
{
Expand Down

0 comments on commit 8cb00e9

Please sign in to comment.