using System.Collections; using System.Collections.Generic; using UnityEngine; using Networking.Server; using UnityEngine.UI; public class animalSelection : MonoBehaviour { public ClientList Clients; public List Animals; void Update() //change function to react on push from the server { if (Clients.ConnectedClients.Count > 0) { for (int i = 0; i < Clients.ConnectedClients.Count; i++) { for (int j = 0; j < Animals.Count; j++) { if (Clients.ConnectedClients[i].characterAnimal == Animals[j].name) { Animals[j].GetComponent().color = Color.black; Animals[j].enabled = false; } } } } } }