ButtonIconSet Class

Definition

An asset for storing textures, sprites and character icons for use with MRTK buttons. Used by ButtonConfigHelper script.

C++
public ref class ButtonIconSet : UnityEngine::ScriptableObject
Inheritance
UnityEngine.ScriptableObject
ButtonIconSet
Attributes
UnityEngine.CreateAssetMenuAttribute

Constructors

Properties

CharIconFont

The font used to render CharIcons.

CharIcons

A set of CharIcons for use by ButtonConfigHelper.

QuadIcons

A set of quad icons for use by ButtonConfigHelper.

SpriteIcons

A set of sprite icons for use by ButtonConfigHelper.

Methods

ConvertCharStringToUInt32(String)

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

ConvertUInt32ToUnicodeCharString(UInt32)

Converts a uint code to a string (used to convert TextMeshPro codes into a string for text fields).

EditorAddCustomQuadIcon(Texture)

Adds a custom quad icon to the quadIcons array. If quad icon already exists in set no action will be taken.

EditorDrawCharIconSelector(UInt32, Boolean, UInt32, Int32)

Draws a selectable grid of character icons.

EditorDrawCharIconSelector(UInt32, UInt32, Int32)

Draws a selectable grid of character icons.

EditorDrawQuadIconSelector(Texture, Boolean, Texture, Int32)

Draws a selectable grid of texture icons.

EditorDrawSpriteIconSelector(Sprite, Boolean, Sprite, Int32)

Draws a selectable grid of sprite icons.

EditorDrawSpriteIconSelector(Sprite, Sprite, Int32)

Draws a selectable grid of sprite icons.

EditorResetCharIconLookups()
GenerateGridContent(Texture[], Boolean)
TryGetCharIcon(String, UInt32)

Searches for a char icon by name.

TryGetQuadIcon(String, Texture2D)

Searches for a quad texture by name.

TryGetSpriteIcon(String, Sprite)

Searches for a sprite for sprite icon by name.

UpdateSpriteIconTextures()

Updates the cached sprite icon textures to the latest textures in spriteIcons

Applies to

Produit Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0