docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ShaderPropertyEntry

    A struct containing the name, description, and property type of a shader property.

    Inheritance
    object
    ShaderPropertyEntry
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.Utilities
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [Serializable]
    [MovedFrom("UnityEditor.Perception.Internal")]
    public abstract class ShaderPropertyEntry

    Fields

    description

    The description of the shader property (eg: "Albedo").

    Declaration
    public string description
    Field Value
    Type Description
    string

    index

    The index of the shader property with which functions such as GetPropertyName are called (eg: 5).

    Declaration
    public int index
    Field Value
    Type Description
    int

    name

    The name of the shader property (eg: "_BaseMap").

    Declaration
    public string name
    Field Value
    Type Description
    string

    Properties

    uiParameter

    A reference to the parameter that is used to sample a value for the shader property.

    Declaration
    public abstract Parameter uiParameter { get; }
    Property Value
    Type Description
    Parameter

    Methods

    Equals(object)

    Override comparing with other objects

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    Any object

    Returns
    Type Description
    bool

    True if RLibShaderProperty and names are equal

    Overrides
    object.Equals(object)

    FromShaderPropertyIndex(Shader, int)

    Collates information such as name, description, type, and flags of a shader property into one class.

    Declaration
    public static ShaderPropertyEntry FromShaderPropertyIndex(Shader shader, int propertyIndex)
    Parameters
    Type Name Description
    Shader shader

    Name of the shader

    int propertyIndex

    Index of the shader property

    Returns
    Type Description
    ShaderPropertyEntry

    A class containing collated information of the shader property

    Remarks

    ShaderPropertyEntry is required as names, descriptions, etc. of a shader property are only available as disparate function calls rather than an encapsulated data types.

    GetHashCode()

    Custom hash calculation

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Custom hash code

    Overrides
    object.GetHashCode()

    SupportedShaderPropertyType()

    The data type of the shader property. Available options: Float, Range, Color, Texture, Vector.

    Declaration
    public abstract ShaderPropertyType SupportedShaderPropertyType()
    Returns
    Type Description
    ShaderPropertyType

    The property type of the supported shader property.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)