Answers for "unity ui show list"

C#
16

unity list

GameObject Obj;
List<GameObject> Objects = new List<GameObject>();

Objects.Add(Obj);
Posted by: Guest on April-05-2020
0

displaying list in gameobject Unity

public List<GameObject> Deck = new List<GameObject>(); // im assuming Deck is your list with prefabs?
public List<GameObject> CreatedCards = new List<GameObject>();

void Start()
{
     Fill();
}

public void Fill()
{
    foreach(GameObject _go in Deck)
    {
        GameObject _newCard = (GameObject)Instantiate(_go);
        CreatedCards.Add(_newCard);
    }
}
Posted by: Guest on July-26-2021

C# Answers by Framework

Browse Popular Code Answers by Language