Class ButtonIconSet
An asset for storing textures, sprites and character icons for use with MRTK buttons. Used by ButtonConfigHelper script.
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public class ButtonIconSet : ScriptableObject
Properties
CharIconFont
The font used to render CharIcons.
Declaration
public TMP_FontAsset CharIconFont { get; }
Property Value
Type | Description |
---|---|
TMP_Font |
CharIcons
A set of CharIcons for use by ButtonConfigHelper.
Declaration
public ButtonIconSet.CharIcon[] CharIcons { get; }
Property Value
Type | Description |
---|---|
Button |
QuadIcons
A set of quad icons for use by ButtonConfigHelper.
Declaration
public Texture2D[] QuadIcons { get; }
Property Value
Type | Description |
---|---|
Texture2D[] |
SpriteIcons
A set of sprite icons for use by ButtonConfigHelper.
Declaration
public Sprite[] SpriteIcons { get; }
Property Value
Type | Description |
---|---|
Sprite[] |
Methods
ConvertCharStringToUInt32(String)
Converts a unicode string to a uint code (for use with TextMeshPro).
Declaration
public static uint ConvertCharStringToUInt32(string charString)
Parameters
Type | Name | Description |
---|---|---|
String | charString |
Returns
Type | Description |
---|---|
UInt32 |
ConvertUInt32ToUnicodeCharString(UInt32)
Converts a uint code to a string (used to convert TextMeshPro codes into a string for text fields).
Declaration
public static string ConvertUInt32ToUnicodeCharString(uint unicode)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | unicode |
Returns
Type | Description |
---|---|
String |
TryGetCharIcon(String, out UInt32)
Searches for a char icon by name.
Declaration
public bool TryGetCharIcon(string iconName, out uint charIcon)
Parameters
Returns
Type | Description |
---|---|
Boolean | True if char icon was found. |
TryGetQuadIcon(String, out Texture2D)
Searches for a quad texture by name.
Declaration
public bool TryGetQuadIcon(string iconName, out Texture2D quadIcon)
Parameters
Type | Name | Description |
---|---|---|
String | iconName | |
Texture2D | quadIcon |
Returns
Type | Description |
---|---|
Boolean | True if quad icon was found. |
TryGetSpriteIcon(String, out Sprite)
Searches for a sprite for sprite icon by name.
Declaration
public bool TryGetSpriteIcon(string iconName, out Sprite spriteIcon)
Parameters
Type | Name | Description |
---|---|---|
String | iconName | |
Sprite | spriteIcon |
Returns
Type | Description |
---|---|
Boolean | True if sprite icon was found. |