docs.unity3d.com
    Show / Hide Table of Contents

    Class MaterialPropertyAttribute

    Marks an IComponentData as an input to a material property on a particular shader.

    Inheritance
    Object
    Attribute
    MaterialPropertyAttribute
    Namespace: Unity.Rendering
    Syntax
    [AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
    public class MaterialPropertyAttribute : Attribute, _Attribute

    Constructors

    MaterialPropertyAttribute(String, Int16)

    Constructs a material property attribute.

    Declaration
    public MaterialPropertyAttribute(string materialPropertyName, short overrideSizeGPU = -1)
    Parameters
    Type Name Description
    String materialPropertyName

    The name of the material property.

    Int16 overrideSizeGPU

    An optional size of the property on the GPU.

    Properties

    Name

    The name of the material property.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String

    OverrideSizeGPU

    The size of the property on the GPU.

    Declaration
    public short OverrideSizeGPU { get; }
    Property Value
    Type Description
    Int16
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023