After hours of google searching and testing out i dont find the right answer. Can someone tell me how i can call a function on a specific Client from server with the new network system like an RPC and the networkplayer with the old network system? i know about the NetworkServer.SendToClient(), but it doesnt seem right or i dont understand it correctly…
Hello, as I see no one answered the question so let me help you a bit. As I see you have the same problem that I had. First way to do what you want is at begining use NetworkServer(and NetworkClient).RegisterHandler(), and then you will be able to use SendToClient(). There is a good example how it works here
Hope this will help you.
There’s a newer, Unity3D 5.4, attribute that’s made for this called [TargetRpc] https://docs.unity3d.com/ScriptReference/Networking.TargetRpcAttribute.html