File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,21 @@ private RpcTypeDefinition(Type type)
8080
8181 Dictionary < ulong , ReflectionMethod > lookupTarget = rpcMethod . serverTarget ? serverMethods : clientMethods ;
8282
83- lookupTarget . Add ( HashMethodNameAndValidate ( method . Name ) , rpcMethod ) ;
83+ ulong nameHash = HashMethodNameAndValidate ( method . Name ) ;
84+
85+ if ( ! lookupTarget . ContainsKey ( nameHash ) )
86+ {
87+ lookupTarget . Add ( nameHash , rpcMethod ) ;
88+ }
8489
8590 if ( parameters . Length > 0 )
8691 {
87- lookupTarget . Add ( HashMethodNameAndValidate ( NetworkedBehaviour . GetHashableMethodSignature ( method ) ) , rpcMethod ) ;
92+ ulong signatureHash = HashMethodNameAndValidate ( NetworkedBehaviour . GetHashableMethodSignature ( method ) ) ;
93+
94+ if ( ! lookupTarget . ContainsKey ( signatureHash ) )
95+ {
96+ lookupTarget . Add ( signatureHash , rpcMethod ) ;
97+ }
8898 }
8999
90100 if ( rpcMethod . useDelegate )
You can’t perform that action at this time.
0 commit comments