How to control other Clients in multiplayer

Hi,

I am trying to make a multiplayer game. I have question about NetWorkPlayer.

I am trying to access other clients by following method.

public NetworkPlayer network;
.
.
.
.

if(network == Network.Connection[0])
{
   //do something

}

I have to ask you guys that this approach is right or wrong if any other method you have please tell me

You can declare an array of NetworkPlayer and assign it with each connected client in the OnPlayerConnected(NetworkPlayer player) function, then just refer to each client by getting reference to the networkView component of a client and comparing its “owner” variable which is of type NetworkPlayer with the NetworkPlayer array you declared.