[Unet] set number for each player with ClientRpc
hi. Im working on a multiplayer game with unet.
and i want set some numbers for each player with ( for loop ) and send this numbers for the players with ClientRpc.
but i don't know how send this specific numbers for each player ?
i do this :
[Server]
void _Ser()
{
if (isServer)
{
for (int i = 0; i < 5; i++)
{
Rpctt(i);
}
}
}
[ClientRpc]
void Rpctt(int t)
{
mynumber = t;
}
but it's wrong , and just send 5 time , last number to all the clients, i want it send 0 to client 1 , 1 to client 2 and ....
anybody can help me Please ? :(
Answer by IMAN_SH · Nov 30, 2016 at 02:01 PM
I found the answer myself... This forum never did help me !
Your answer
Follow this Question
Related Questions
Unity Networking: Loading Screen 0 Answers
How to sync RPC function Photon Network? 1 Answer
ClientRPC not called from command on client instance during Start() 0 Answers
Unity 5.1 networking 0 Answers
Simple ClientRpc Whats wrong with it? 0 Answers