Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnEnable (){
- // In case you do not have or have removed your inventory manager after this script was initialized, reset the itemListObject and itemList.
- itemListObject = null;
- itemList = null;
- // The Inventory Manager must be called ("InventoryManager" and you must have only one.)
- if (GameObject.Find("InventoryManager")) {
- itemListObject = GameObject.Find("InventoryManager");
- itemList = GameObject.Find("InventoryManager").GetComponent<ItemList>().items;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement