docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method FindProperty

    FindProperty(string, MaterialProperty[])

    Searches and tries to find a property in an array of properties.

    Declaration
    public static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties)
    Parameters
    Type Name Description
    string propertyName

    The property to find.

    MaterialProperty[] properties

    Array of properties to search in.

    Returns
    Type Description
    MaterialProperty

    A MaterialProperty instance for the property.

    FindProperty(string, MaterialProperty[], bool)

    Searches and tries to find a property in an array of properties.

    Declaration
    public static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties, bool propertyIsMandatory)
    Parameters
    Type Name Description
    string propertyName

    The property to find.

    MaterialProperty[] properties

    Array of properties to search in.

    bool propertyIsMandatory

    Should throw exception if property is not found

    Returns
    Type Description
    MaterialProperty

    A MaterialProperty instance for the property.

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