Show / Hide Table of Contents

    Class InteractableColorTheme

    A color theme that can set colors on renderers or common text objects This theme will try to set color on text objects first, if none can be found, then we fall back to renderer color setting using the parent class.

    Inheritance
    Object
    InteractableThemeBase
    InteractableShaderTheme
    InteractableColorTheme
    ScaleOffsetColorTheme
    Inherited Members
    InteractableShaderTheme.propertyBlock
    InteractableShaderTheme.shaderProperties
    InteractableShaderTheme.renderer
    InteractableShaderTheme.GetFloat(GameObject, Int32)
    InteractableShaderTheme.SetPropertyBlock(GameObject, MaterialPropertyBlock)
    InteractableShaderTheme.SetFloat(MaterialPropertyBlock, Single, Int32)
    InteractableShaderTheme.GetColor(GameObject, Int32)
    InteractableShaderTheme.SetColor(MaterialPropertyBlock, Color, Int32)
    InteractableThemeBase.Types
    InteractableThemeBase.Name
    InteractableThemeBase.ThemeProperties
    InteractableThemeBase.CustomSettings
    InteractableThemeBase.Host
    InteractableThemeBase.Ease
    InteractableThemeBase.NoEasing
    InteractableThemeBase.Loaded
    InteractableThemeBase.AssemblyQualifiedName
    InteractableThemeBase.LerpFloat(Single, Single, Single)
    InteractableThemeBase.LerpInt(Int32, Int32, Single)
    InteractableThemeBase.CopyEase(Easing)
    InteractableThemeBase.OnUpdate(Int32, Interactable, Boolean)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.UI
    Assembly: cs.temp.dll.dll
    Syntax
    public class InteractableColorTheme : InteractableShaderTheme

    Constructors

    InteractableColorTheme()

    Declaration
    public InteractableColorTheme()

    Methods

    GetProperty(InteractableThemeProperty)

    Declaration
    public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Returns
    Type Description
    InteractableThemePropertyValue
    Overrides
    InteractableShaderTheme.GetProperty(InteractableThemeProperty)

    HasTextComponentOnObject(GameObject)

    Looks to see if a text component exists on the host

    Declaration
    public static bool HasTextComponentOnObject(GameObject host)
    Parameters
    Type Name Description
    GameObject host
    Returns
    Type Description
    Boolean

    Init(GameObject, InteractableThemePropertySettings)

    Declaration
    public override void Init(GameObject host, InteractableThemePropertySettings settings)
    Parameters
    Type Name Description
    GameObject host
    InteractableThemePropertySettings settings
    Overrides
    InteractableShaderTheme.Init(GameObject, InteractableThemePropertySettings)

    SetValue(InteractableThemeProperty, Int32, Single)

    Declaration
    public override void SetValue(InteractableThemeProperty property, int index, float percentage)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Int32 index
    Single percentage
    Overrides
    InteractableShaderTheme.SetValue(InteractableThemeProperty, Int32, Single)

    TryGetRendererColor(InteractableThemeProperty, out Color)

    Try to get color from the renderer return true, no text components exists, so falling back to base

    Declaration
    protected bool TryGetRendererColor(InteractableThemeProperty property, out Color color)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Color color
    Returns
    Type Description
    Boolean

    TryGetTextColor(InteractableThemeProperty, out Color)

    Try to get a color from UI Text if no color is found, a text component does not exist on this object

    Declaration
    protected bool TryGetTextColor(InteractableThemeProperty property, out Color color)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Color color
    Returns
    Type Description
    Boolean

    TryGetTextMeshColor(InteractableThemeProperty, out Color)

    Try to get color from TextMesh If no color is found, not TextMesh on this object

    Declaration
    protected bool TryGetTextMeshColor(InteractableThemeProperty property, out Color color)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Color color
    Returns
    Type Description
    Boolean

    TryGetTextMeshProColor(InteractableThemeProperty, out Color)

    Try to get color from TextMeshPro If no color is found, TextMeshPro is not on the object

    Declaration
    protected bool TryGetTextMeshProColor(InteractableThemeProperty property, out Color color)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Color color
    Returns
    Type Description
    Boolean

    TryGetTextMeshProUGUIColor(InteractableThemeProperty, out Color)

    Try to get color from TextMeshProUGUI If no color is found, TextMeshProUGUI is not on the object

    Declaration
    protected bool TryGetTextMeshProUGUIColor(InteractableThemeProperty property, out Color color)
    Parameters
    Type Name Description
    InteractableThemeProperty property
    Color color
    Returns
    Type Description
    Boolean

    TrySetRendererColor(Color, InteractableThemeProperty, Int32, Single)

    Try to set color on a renderer should just return true - falling back to base

    Declaration
    protected bool TrySetRendererColor(Color colour, InteractableThemeProperty property, int index, float percentage)
    Parameters
    Type Name Description
    Color colour
    InteractableThemeProperty property
    Int32 index
    Single percentage
    Returns
    Type Description
    Boolean

    TrySetTextColor(Color, InteractableThemeProperty, Int32, Single)

    Try to set color on UI Text If false, no UI Text was found

    Declaration
    protected bool TrySetTextColor(Color colour, InteractableThemeProperty property, int index, float percentage)
    Parameters
    Type Name Description
    Color colour
    InteractableThemeProperty property
    Int32 index
    Single percentage
    Returns
    Type Description
    Boolean

    TrySetTextMeshColor(Color, InteractableThemeProperty, Int32, Single)

    Try to set color on TextMesh If false, no TextMesh was found

    Declaration
    protected bool TrySetTextMeshColor(Color colour, InteractableThemeProperty property, int index, float percentage)
    Parameters
    Type Name Description
    Color colour
    InteractableThemeProperty property
    Int32 index
    Single percentage
    Returns
    Type Description
    Boolean

    TrySetTextMeshProColor(Color, InteractableThemeProperty, Int32, Single)

    Try to set color on TextMeshPro If false, no TextMeshPro was found

    Declaration
    protected bool TrySetTextMeshProColor(Color colour, InteractableThemeProperty property, int index, float percentage)
    Parameters
    Type Name Description
    Color colour
    InteractableThemeProperty property
    Int32 index
    Single percentage
    Returns
    Type Description
    Boolean

    TrySetTextMeshProUGUIColor(Color, InteractableThemeProperty, Int32, Single)

    Try to set color on TextMeshProUGUI If false, no TextMeshProUGUI was found

    Declaration
    protected bool TrySetTextMeshProUGUIColor(Color colour, InteractableThemeProperty property, int index, float percentage)
    Parameters
    Type Name Description
    Color colour
    InteractableThemeProperty property
    Int32 index
    Single percentage
    Returns
    Type Description
    Boolean
    Back to top Generated by DocFX