public void AddUnlockToUI(BusinessUIElement b) { GameObject unlockEl = Instantiate(unlockUIElementPrefab) as GameObject; unlockEl.transform.SetParent(unlocksContainer.transform, false); b.currentUnlockUIElement = unlockEl.GetComponent <UnlockUIElement>(); b.currentUnlockUIElement.SetupUI(b.info, b.info.state.currentUnlock); }
public void AddBusinessToUI(BusinessInfo b) { GameObject prefab = Instantiate(businessUIElementPrefab) as GameObject; BusinessUIElement ui = prefab.GetComponent <BusinessUIElement>(); ui.info = b; businessUIElements.Add(ui); AddUnlockToUI(ui); }