What's the RPC Equivalent to the New Unity Network?

Unity updated its networking system and called it old.

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

+3


source to share


1 answer


[ClientRpc]

is the equivalent in the new networked system.

See here http://docs.unity3d.com/Manual/UNetActions.html for details




In response to your comment:

Quite right. You are [Command]

from clients to the server and [ClientRpc]

from the server to all clients.

Alternatively, you can send messages to individual clients using the function Send()

in connectionToClient

for NetworkBehaviour

. http://docs.unity3d.com/ScriptReference/Networking.NetworkConnection.Send.html

+1


source







All Articles