Show / Hide Table of Contents

    Class InteractableThemeShaderUtils

    Collection of shader and material utilities

    Inheritance
    Object
    InteractableThemeShaderUtils
    Namespace: Microsoft.MixedReality.Toolkit.UI
    Assembly: cs.temp.dll.dll
    Syntax
    public class InteractableThemeShaderUtils : MonoBehaviour

    Methods

    GetMaterialPropertyBlock(GameObject, ShaderProperties[])

    Get a MaterialPropertyBlock and copy the designated properties

    Declaration
    public static MaterialPropertyBlock GetMaterialPropertyBlock(GameObject gameObject, ShaderProperties[] props)
    Parameters
    Type Name Description
    GameObject gameObject
    ShaderProperties[] props
    Returns
    Type Description
    MaterialPropertyBlock

    GetPropertyBlock(GameObject)

    Get the MaterialPropertyBlock from a renderer on a gameObject

    Declaration
    public static MaterialPropertyBlock GetPropertyBlock(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject
    Returns
    Type Description
    MaterialPropertyBlock

    GetValidMaterial(Renderer)

    Grab the shared material to avoid creating new material instances and breaking batching. Because MaterialPropertyBlocks are used for setting material properties the shared material is used to set the initial state of the MaterialPropertyBlock(s) before mutating state.

    Declaration
    public static Material GetValidMaterial(Renderer renderer)
    Parameters
    Type Name Description
    Renderer renderer
    Returns
    Type Description
    Material
    Back to top Generated by DocFX