void OnEnable() { if (GetComponent <Inventory_Master>() != null) { inventoryMaster = GetComponent <Inventory_Master>(); } else { if (GetComponent <Item_Master>().refNumber == -1) { Debug.Log("You must add a inventory master script to the player."); } } }
void SetInitialReferences() { inventoryMaster = GetComponent <Inventory_Master>(); }
void OnEnable() { inventoryMaster = GameObject.FindGameObjectWithTag("Player").GetComponent <Inventory_Master>(); }
void SetInitialReferences() { inventoryMaster = GameObject.FindGameObjectWithTag("Player").GetComponent <Inventory_Master>(); }
void SetInitialReferences() { inventoryMaster = transform.root.GetComponent <Inventory_Master>(); }