Skip to content

Commit df8458c

Browse files
committed
second try at fixing breaking change
1 parent 0408a07 commit df8458c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,10 @@ internal virtual void __initializeRpcs()
941941
}
942942

943943
#pragma warning disable IDE1006 // disable naming rule violation check
944+
// This is needed to add the RpcInvokePermission as even with an optional parameter, the change counts as a breaking change.
945+
internal void __registerRpc(uint hash, RpcReceiveHandler handler, string rpcMethodName) => __registerRpc(hash, handler, rpcMethodName, RpcInvokePermission.Everyone);
944946
// RuntimeAccessModifiersILPP will make this `protected`
945-
internal void __registerRpc(uint hash, RpcReceiveHandler handler, string rpcMethodName, RpcInvokePermission permission = RpcInvokePermission.Everyone)
947+
internal void __registerRpc(uint hash, RpcReceiveHandler handler, string rpcMethodName, RpcInvokePermission permission)
946948
#pragma warning restore IDE1006 // restore naming rule violation check
947949
{
948950
__rpc_func_table[GetType()][hash] = handler;

0 commit comments

Comments
 (0)