Search Unity

TextMesh Pro HasCharacters with searchFallbacks set to true

Discussion in 'UGUI & TextMesh Pro' started by SniperED007, Dec 14, 2020.

  1. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    With the following function you get an output of missing characers, but it doesn't check the fallback fonts.
    font.HasCharacters(tempMessage, out List<char> missing);

    But if you use this function which supports the fallback fonts then it gives you an output of ints, what are these ints?
    font.HasCharacters(tempMessage, out uint[] missing, true, true);

    So how do I get the missing characters from the int value?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The array contains the Unicode values of the missing characters. For instance, the letter "A" would be 65.

    This is an array of uint because Unicode values are 32 bit whereas the char type is only 16 bit.