public void Initialize() { if (instance != null) { Destroy(instance); } instance = this; dummy.Initialize(); AddItem(DataStorageKeyset.MyKey, MyKey); }
private DummyContainer CreateTestContainer() { GameObject containerGo = new GameObject(); GameObject itemGo = new GameObject(); itemGo.transform.SetParent(containerGo.transform); DummyContainer container = containerGo.AddComponent <DummyContainer>(); DummyItem item = itemGo.AddComponent <DummyItem>(); container.ItemTemplate = item; container.Initialize(); return(container); }