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)
80
80
81
81
Dictionary < ulong , ReflectionMethod > lookupTarget = rpcMethod . serverTarget ? serverMethods : clientMethods ;
82
82
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
+ }
84
89
85
90
if ( parameters . Length > 0 )
86
91
{
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
+ }
88
98
}
89
99
90
100
if ( rpcMethod . useDelegate )
You can’t perform that action at this time.
0 commit comments