void OnEnable() { if (objectWithInventory != null) { inventory = objectWithInventory.GetComponent<MarrowInventory>(); if (inventory == null) throw new UnityException("Object does not have an inventory."); } }
void OnEnable() { if (objectWithInventory != null) { inventory = objectWithInventory.GetComponent <MarrowInventory>(); if (inventory == null) { throw new UnityException("Object does not have an inventory."); } } }