question= why text become centered like that, and how to fix it?
i have test it with unity text and unity text have no problem like this.
anyone can help?
Is it possible that this font does not include the ‘.’ character? If so you might need a fallback font to make up for it.
Also you can check if there is a warning about Ellipsis or Underline in your console because if ‘_’ and ‘…’ are missing then TMP seems to use some characters of your font to replace them.
Finally it might be a kerning issue though I’m not very confident about that. You can still verify that Kerning is checked in the Extra settings of your TMP object.
did you mean “・” this interpunct ? i tried it with only " " (space) as divider, doing it alphabet instead of japanese but still the same.
but things i know if i make it like,
public string GetFullName
{
get
{
string fullName = "abc"+ " ・ " + "def";
return fullName;
}
}
then it is work as i expected “abc ・ def”. seems like this happen because i referencing string from firstName & lastName.
i try to on and off all option in extra setting and still nothing changed.
[Serializable]
public class Character
{
public string firstName = "FirstName";
public string lastName = "LastName";
public string fullname;
private void joinname()
{
fullName = firstName + " ・ " + lastName;
}
}
i also tried it with method instead of properties, call method, then get fullname but still not work.
i also add more pictures about my settings.
note: in the picture text work as expected because its in editor and not getting text by joining first and last name.
[Serializable]
public class Character
{
public string firstName = "FirstName";
public string lastName = "LastName";
[System.NonSerialized]
public string fullName;
public string GetFullName
{
get
{
fullName = $"{firstName} ・ {lastName}";
Debug.Log($"fullName->{fullName}") ;
return fullName;
}
}
}