docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method RegisterMaterialPropertyType

    RegisterMaterialPropertyType(Type, string, short)

    Registers a material property type with the given name.

    Declaration
    public static void RegisterMaterialPropertyType(Type type, string propertyName, short overrideTypeSizeGPU = -1)
    Parameters
    Type Name Description
    Type type

    The type of material property to register.

    string propertyName

    The name of the property.

    short overrideTypeSizeGPU

    An optional size of the type on the GPU.

    RegisterMaterialPropertyType<T>(string, short)

    A templated version of the material type registration method.

    Declaration
    public static void RegisterMaterialPropertyType<T>(string propertyName, short overrideTypeSizeGPU = -1) where T : IComponentData
    Parameters
    Type Name Description
    string propertyName

    The name of the property.

    short overrideTypeSizeGPU

    An optional size of the type on the GPU.

    Type Parameters
    Name Description
    T

    The type of material property to register.

    In This Article
    Back to top
    Copyright © 2023 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)