Class MaterialPropertyAttribute
Marks an IComponentData as an input to a material property on a particular shader.
Namespace: Unity.Rendering
Assembly: Unity.Entities.Graphics.dll
Syntax
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
public class MaterialPropertyAttribute : Attribute
Constructors
MaterialPropertyAttribute(string, short)
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. |
| short | overrideSizeGPU | An optional size of the property on the GPU. This is in bytes. |
Properties
Name
The name of the material property.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
OverrideSizeGPU
The size of the property in bytes on the GPU.
Declaration
public short OverrideSizeGPU { get; }
Property Value
| Type | Description |
|---|---|
| short |