public void PollPlayerList(Action<List<NetworkingPlayer>> callback = null)
{
if (OwningNetWorker.IsServer)
{
if (callback != null)
{
List<NetworkingPlayer> tmp = new List<NetworkingPlayer>(OwningNetWorker.Players.ToArray());
tmp.Insert(0, OwningNetWorker.Me);
callback(tmp);
}
return;
}
pollPlayersCallback = callback;
RPC("PollPlayers", NetworkReceivers.Server);
}