using System.Collections.Generic; using UnityEngine; using Networking.Client; using UnityEngine.UI; public class animalSelection : MonoBehaviour { public ConnectedClients Clients; public List Animals; public int count; public void Update() { count = Clients.AllClients.Count; if (Clients.AllClients.Count > 0) { for (int i = 0; i < Clients.AllClients.Count; i++) { for (int j = 0; j < Animals.Count; j++) { if (Clients.AllClients[i].characterAnimal == Animals[j].name) { Animals[j].GetComponent().color = Color.black; Animals[j].enabled = false; } } } } } }