Version: 2018.1

Font.GetCharacterInfo

Switch to Manual
public bool GetCharacterInfo (char ch, out characterInfo info, int size= 0, FontStyle style= FontStyle.Normal);

Parameters

chThe character you need rendering information for.
infoReturns the CharacterInfo struct with the rendering information for the character (if available).
sizeThe size of the character (default value of zero will use font default size).
styleСтиль символа.

Description

Получить информацию о визуализации определенного символа.

Note: You should only ever need to use this when you want to implement your own text rendering. If the character ch with the specified size and style is present in the font texture, then this method will return true, and info will contain the texture placement information for that character. If the character is not present, this method returns false. If size is zero, it will use the default size for the font.

See Also: characterInfo. Example at RequestCharactersInTexture.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961