public void CloseStorageUI() { storageCache.clientUpdatedDelegate -= StorageUpdatedEvent; storageCache = null; for (int i = localSlotCache.Count - 1; i >= 0; i--) { InventorySlotCache.Remove(localSlotCache[i]); Destroy(localSlotCache[i].transform.parent.gameObject); } localSlotCache.Clear(); }
public void CloseStorageUI() { SoundManager.PlayAtPosition("Rustle0" + UnityEngine.Random.Range(1, 6).ToString(), PlayerManager.LocalPlayer.transform.position); storageCache.clientUpdatedDelegate -= StorageUpdatedEvent; storageCache = null; for (int i = localSlotCache.Count - 1; i >= 0; i--) { InventorySlotCache.Remove(localSlotCache[i]); Destroy(localSlotCache[i].transform.parent.gameObject); } localSlotCache.Clear(); }