private void Awake() { if (instance != null) { Debug.LogWarning("More than one bit-world inventory."); } instance = this; }
// Tries to subscribe to inventory delegate until it is found IEnumerator SubscribeToInventory() { while (true) { BWInventory inv = BWInventory.Instance; if (inv != null) { inv.InventoryUpdateCall += UpdateText; break; } yield return(null); } }