//--Events private void ChooseEvent(List <Event_Data> events) { indexAux = Random.Range(0, events.Count); //params are min(inclusive), max(exclusive) GameObject ev = Instantiate(eventPrefab); ev.GetComponent <EventBHV> ().Load(events[indexAux]); //Carregar atributos da carta - de índice rand events.RemoveAt(indexAux); uiBoolSlider.SetActiveBoolAction(ev); }