Class ButtonIconSet
An asset for storing textures, sprites and character icons for use with MRTK buttons. Used by ButtonConfigHelper script.
Inheritance
ButtonIconSet
Assembly: cs.temp.dll.dll
public class ButtonIconSet : ScriptableObject
Properties
The font used to render CharIcons.
Declaration
public TMP_FontAsset CharIconFont { get; }
Property Value
Type |
Description |
TMP_FontAsset |
|
A set of CharIcons for use by ButtonConfigHelper.
Declaration
public ButtonIconSet.CharIcon[] CharIcons { get; }
Property Value
A set of quad icons for use by ButtonConfigHelper.
Declaration
public Texture2D[] QuadIcons { get; }
Property Value
Type |
Description |
Texture2D[] |
|
A set of sprite icons for use by ButtonConfigHelper.
Declaration
public Sprite[] SpriteIcons { get; }
Property Value
Type |
Description |
Sprite[] |
|
Methods
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
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
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.
|
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.
|