public PopupBoxVote getVoteBox(VoteSession sess, VoteOption option) { GameObject obj = Instantiate(voteBox) as GameObject; PopupBoxVote specific = obj.GetComponent <PopupBoxVote>(); specific.setTo(sess, option); return(specific); }
public PopupScrollSet getScrollSet(VoteSession sess, List <VoteOption> votes) { PopupScrollSet specific = getInnerScrollSet(); foreach (VoteOption b in votes) { PopupBoxVote box = getVoteBox(sess, b); box.gameObject.transform.SetParent(specific.gameObject.transform); specific.scrollables.Add(box); } return(specific); }