ButtonConfigHelper Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Helper component that gathers the most commonly modified button elements in one place.
public ref class ButtonConfigHelper : UnityEngine::MonoBehaviour
[UnityEngine.ExecuteAlways]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/button#how-to-change-the-icon-and-text")]
public class ButtonConfigHelper : UnityEngine.MonoBehaviour
[<UnityEngine.ExecuteAlways>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/button#how-to-change-the-icon-and-text")>]
type ButtonConfigHelper = class
inherit MonoBehaviour
Public Class ButtonConfigHelper
Inherits MonoBehaviour
- Inheritance
-
UnityEngine.MonoBehaviourButtonConfigHelper
- Attributes
-
UnityEngine.ExecuteAlwaysAttribute UnityEngine.HelpURLAttribute
Constructors
ButtonConfigHelper() |
Properties
IconSet |
The button's icon set. Note that setting this will not automatically assign an icon from the new set. |
IconStyle |
Modifies the button's icon rendering style. |
MainLabelText |
Modifies the main label text. |
OnClick |
Returns the Interactable's OnClick event. |
SeeItSayItLabelEnabled |
Turns the see it / say it label object on / off. |
SeeItSayItLabelText |
Modifies the 'See it / Say it' label text. |
Methods
EditorCheckForCustomIcon() |
Returns true if the button is using a custom icon material. |
EditorSetDefaultIconSet(ButtonIconSet) | |
EditorSetDefaultQuadMaterial(Material) | |
EditorSetIconQuadRenderer(MeshRenderer) | |
EditorUpgradeCustomIcon(ButtonIconSet, String, Boolean) |
Upgrades a button using a custom icon material. |
ForceRefresh() |
Forces the config helper to apply its internal settings. |
SetCharIcon(UInt32, Object) |
Sets the character for the button. This automatically sets the button icon style to Char. |
SetCharIconByName(String) |
Searches the icon set for a character matching newIconCharName. If no icon set is available, or if no texture with that name is found, no action is taken. |
SetQuadIcon(Texture) |
Sets the quad texture for the button. This automatically sets the button icon style to Quad. |
SetQuadIconByName(String) |
Searches the icon set for a texture matching newIconTextureName. If no icon set is available, or if no texture with that name is found, no action is taken. |
SetSpriteIcon(Sprite) |
Sets the sprite for the button. This automatically sets the button icon style to Sprite. |
SetSpriteIconByName(String) |
Searches the icon set for a texture matching newIconSpriteName. If no icon set is available, or if no texture with that name is found, no action is taken. |