In the unity android I have to restrict the specific name to maximum length of 25.Emojis are also allowed to be used.I want to know how we can restrict the emojis so that the name is < 25.For the characters it works fine.
if(name>Max_Length)
{
myName=name.SubString(0,Max_Length);
}
How can i restrict the emojis because emoji's take 2-4 bytes.With this if emoji's 1 byte has been taken when the name reaches 25 characters it invalidates that emoji(I get a box).If this is the case I don't want to take the last emoji.Please help.Currently I am using TouchScreenKeyboard class in unity.