日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class InteractableShaderTheme

    Theme Engine to control the value of a particular Shader Property based on state changes Targets the first Renderer component on the initialized GameObject and use MaterialPropertyBlocks

    Inheritance
    Object
    InteractableThemeBase
    InteractableShaderTheme
    InteractableColorChildrenTheme
    InteractableColorTheme
    InteractableTextureTheme
    Inherited Members
    InteractableThemeBase.Types
    InteractableThemeBase.Name
    InteractableThemeBase.StateProperties
    InteractableThemeBase.Properties
    InteractableThemeBase.Host
    InteractableThemeBase.Ease
    InteractableThemeBase.Loaded
    InteractableThemeBase.IsEasingSupported
    InteractableThemeBase.originalStateValues
    InteractableThemeBase.CreateTheme(Type)
    InteractableThemeBase.CreateAndInitTheme(ThemeDefinition, GameObject)
    InteractableThemeBase.Reset()
    InteractableThemeBase.OnUpdate(Int32, Boolean)
    InteractableThemeBase.LerpFloat(Single, Single, Single)
    InteractableThemeBase.LerpInt(Int32, Int32, Single)
    InteractableThemeBase.GetThemeProperty(Int32)
    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 InteractableShaderTheme : InteractableThemeBase

    Constructors

    InteractableShaderTheme()

    Declaration
    public InteractableShaderTheme()

    Fields

    DefaultShaderProperty

    Declaration
    protected const string DefaultShaderProperty = "_Color"
    Field Value
    Type Description
    String

    propertyBlock

    Declaration
    protected MaterialPropertyBlock propertyBlock
    Field Value
    Type Description
    MaterialPropertyBlock

    renderer

    Declaration
    protected Renderer renderer
    Field Value
    Type Description
    Renderer

    shaderProperties

    Declaration
    protected List<ThemeStateProperty> shaderProperties
    Field Value
    Type Description
    List<ThemeStateProperty>

    Properties

    AreShadersSupported

    Indicates whether the current Theme engine implementation supports shader targeting on state properties

    Declaration
    public override bool AreShadersSupported { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    InteractableThemeBase.AreShadersSupported

    Methods

    GetColor(GameObject, Int32)

    Declaration
    [Obsolete("GetColor is no longer supported. Access the material block directly on the GameObject provided.")]
    public static Color GetColor(GameObject host, int propId)
    Parameters
    Type Name Description
    GameObject host
    Int32 propId
    Returns
    Type Description
    Color

    GetDefaultThemeDefinition()

    Generates the default theme definition configuration for the current theme implementation

    Declaration
    public override ThemeDefinition GetDefaultThemeDefinition()
    Returns
    Type Description
    ThemeDefinition

    Default ThemeDefinition to initialize with the current theme engine implementation

    Overrides
    InteractableThemeBase.GetDefaultThemeDefinition()

    GetFloat(GameObject, Int32)

    Declaration
    [Obsolete("GetFloat is no longer supported. Access the material block directly on the GameObject provided.")]
    public static float GetFloat(GameObject host, int propId)
    Parameters
    Type Name Description
    GameObject host
    Int32 propId
    Returns
    Type Description
    Single

    GetProperty(ThemeStateProperty)

    Get the current property value for the provided state property

    Declaration
    public override ThemePropertyValue GetProperty(ThemeStateProperty property)
    Parameters
    Type Name Description
    ThemeStateProperty property

    state property to access

    Returns
    Type Description
    ThemePropertyValue

    Value currently for given state property

    Overrides
    InteractableThemeBase.GetProperty(ThemeStateProperty)

    Init(GameObject, ThemeDefinition)

    Initialize current Theme Engine with given configuration and target the provided GameObject

    Declaration
    public override void Init(GameObject host, ThemeDefinition definition)
    Parameters
    Type Name Description
    GameObject host

    GameObject to target changes against

    ThemeDefinition definition

    Configuration information to initialize Theme Engine

    Overrides
    InteractableThemeBase.Init(GameObject, ThemeDefinition)

    SetValue(ThemeStateProperty, ThemePropertyValue)

    Instruct theme to set value for current property with ThemePropertyValue value provided

    Declaration
    protected override void SetValue(ThemeStateProperty property, ThemePropertyValue value)
    Parameters
    Type Name Description
    ThemeStateProperty property

    property to update value

    ThemePropertyValue value

    Value for theme to set

    Overrides
    InteractableThemeBase.SetValue(ThemeStateProperty, ThemePropertyValue)

    SetValue(ThemeStateProperty, Int32, Single)

    Instruct theme to set value for current property with given index state and at given lerp percentage

    Declaration
    public override void SetValue(ThemeStateProperty property, int index, float percentage)
    Parameters
    Type Name Description
    ThemeStateProperty property

    property to update value

    Int32 index

    index of state to access array of values

    Single percentage

    percentage transition between values

    Overrides
    InteractableThemeBase.SetValue(ThemeStateProperty, Int32, Single)
    Back to top Generated by DocFX