void Awake() { ItemContainerManager.ItemContainers.Add(this); if (ItemLoader == null) { ItemLoader = GetComponentInChildren <PersistentItemContainer>(); } if (GetComponent(typeof(IContainerAddAction)) == null) { ContainerAddAction = gameObject.AddComponent <BasicAddContainer>(); } else { ContainerAddAction = (IContainerAddAction)GetComponent(typeof(IContainerAddAction)); } }
void Awake() { ItemContainerManager.ItemContainers.Add(this); if (ItemLoader == null) ItemLoader = GetComponentInChildren<PersistentItemContainer>(); if (GetComponent(typeof(IContainerAddAction)) == null) ContainerAddAction = gameObject.AddComponent<BasicAddContainer>(); else ContainerAddAction = (IContainerAddAction)GetComponent(typeof(IContainerAddAction)); }