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 ?