FontIconSet Class

Definition

A Unity object for managing a set of character icons for use with MRTK UX via Unity text components.

C#
[UnityEngine.CreateAssetMenu(fileName="MRTK_UX_FontIconSet_New", menuName="MRTK/UX/Font Icon Set")]
public class FontIconSet : UnityEngine.ScriptableObject
Inheritance
UnityEngine.ScriptableObject
FontIconSet
Attributes
UnityEngine.CreateAssetMenuAttribute

Remarks

This is intended to be used with FontIconSelector, which can be used to set the desired static icon for a Unity text component, and can also bind to a data source that can select an icon by its name.

When using a style sheet, it is important to use a style that maps to the desired text font asset by its name and any other styling desired when rendered, such as size and color.

Constructors

Properties

GlyphIconsByName

A mapping between icon names and the unicode value of the glyph it describes.

IconFontAsset

Any text font asset that contains the desired icons as glyphs that map to Unicode character values.

OptionalEditorMaterial

Optional material to use for rendering glyphs in editor.

Methods

AddIcon(String, UInt32)

Add icon to the available set based on a glyph in the TMP_FontAsset.

ConvertHexStringToUnicode(String)

Converts a unicode string to a uint code (for use with TextMeshPro).

ConvertUnicodeToHexString(UInt32)

Converts a unicode value to a string.

RemoveIcon(String)

Remove an icon from available set by its name.

TryGetGlyphIcon(String, UInt32)

Try to get a glyph icon's unicode value by name.

UpdateIconName(String, String)

Update the name of an icon.

Applies to

Proizvod Verzije
MRTK3 UX Core 3.0, 3.1, 3.2