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