Class MaterialPropertyAttribute
Marks an IComponentData as an input to a material property on a particular shader.
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 |