Twut CreateTwut(Profile from, string text) { Twut twut = new Twut() { author = from, message = text }; twuts.Add(twut); return(twut); }
void SpawnTwut(Twut twut) { GameObject go = Instantiate(twutCellPrefab); TwutCell cell = go.GetComponent <TwutCell>(); cell.rectT.SetParent(feedTransform); cell.rectT.SetAsFirstSibling(); // TODO: Set picture cell.avatar.texture = twut.author.avatarSprite.texture; cell.nick.text = twut.author.name; cell.text.text = twut.message; }