Untitled

Anonymous
plain_text
12/07/2021 12:31 PM
816 B
24
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...