What is the equivalent of RPC in new Unity Networking?

7k views Asked by At

Unity has upgraded its Networking system and called the old one as legacy networking.

So how do we change our RPC calls into the new Unity Networking? What is the equivalent of this approach? Should we write our own methods for it? (Sending byte arrays etc.)

1

There are 1 answers

2
Andy Barnard On BEST ANSWER

[ClientRpc] is the equivalent in the new Networking system.

See here for more information - http://docs.unity3d.com/Manual/UNetActions.html


In response to your comment:

Exactly. You [Command] from clients up to the server and [ClientRpc] from the server down to all clients.

In addition, you can send messages to individual clients using the Send() function on the connectionToClient of a NetworkBehaviour. http://docs.unity3d.com/ScriptReference/Networking.NetworkConnection.Send.html