Hello!
I am currently trying to create a chat using Unity.
I am trying to instantiate emoticons at the position that the emoticon symbol was found but I am having to luck as of yet.
I am correctly identifying the emoticons but I cannot instantiate them at the position the emoticon symbols were found.
Please help me!
Thank you!
foreach (string item in EmojiStringList)
{
if (usr.GetComponentInChildren<Text>().text.Contains(item))
{
switch (item)
{
case "^_^":
{
usr.GetComponentInChildren<Text>().text.Replace(item, string.Empty);
GameObject emo = Instantiate(emoji[0], position, Quaternion.identity) as GameObject;
emo.transform.SetParent(usr.transform, false);
break;
}
}
}
}