private TextWithEmoji GetEmojiText() { if (_emojiText == null) { foreach (Transform child in transform) { if (child.GetComponent <TextWithEmoji> () != null) { _emojiText = child.GetComponent <TextWithEmoji> (); break; } } } return(_emojiText); }
protected override void Awake() { base.Awake(); _emojiText = gameObject.GetComponentInChildren <TextWithEmoji> (); }