Untitled
unknown
plain_text
4 years ago
612 B
6
Indexable
using System.Collections; using System.Collections.Generic; using UnityEngine; public class InventoryItemList : MonoBehaviour { public List<GameObject> ItemsInInventory = new List<GameObject>(5); public GameObject InvMenuPanel; private void Start() { AddItemToList(); } void AddItemToList() { for (int i = 0; i < ItemsInInventory.Capacity; i++) { ItemsInInventory.Add(Instantiate(gameObject, InvMenuPanel.transform,InvMenuPanel.transform.parent)); } } }
Editor is loading...