public void Create(TwifeMessageBox messageBox) { MessageBoxSelectorItem item = Instantiate(gameObject).GetComponent <MessageBoxSelectorItem>(); item.transform.SetParent(transform.parent, false); item.gameObject.SetActive(true); item.AssingMessageBox(messageBox); }
public void AssingMessageBox(TwifeMessageBox tmb) { this.messageBox = tmb; this.name = tmb.gameObject.name; GetComponentInChildren <Text>().text = tmb.gameObject.name; }