-
Notifications
You must be signed in to change notification settings - Fork 457
Closed
Labels
type:featureNew feature, request or improvementNew feature, request or improvement
Description
Is your feature request related to a problem? Please describe.
We want to call Client & Server Code with one RPC. The server should call the method directly and send an RPC to the client.
Currently this is not possible.
Describe the solution you'd like
Have a Method Attribute which is called "RPC" or "SharedRPC" which i can tag my methods with.
It then instead of only calling an Client RPC it also executes the function on the server.
Additional context
We have exposed functions which only foward their calls to an Unity Event. Our components now can listen to that event on the server and client. To do this i have to write something like this:
private void CalledSomewhereOnTheServer(){
DoServerThings();
onChangeUnityEvent?.Invoke(23);
MyClientRpc(23);
}
[ClientRpc]
private void MyClientRpc(int i){
onChangeUnityEvent?.Invoke(i);
}
Metadata
Metadata
Assignees
Labels
type:featureNew feature, request or improvementNew feature, request or improvement