MaterialDefinition
Describes a VisualElement material.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Implements: IEquatable<MaterialDefinition>
public struct MaterialDefinition : IEquatable<MaterialDefinition>
Constructors
Constructor | Description |
|---|---|
| MaterialDefinition(UnityEngine.Material) | Creates from a Material. |
Properties
Property | Description |
|---|---|
| material | The material to use to render the element. |
Methods
Method | Description |
|---|---|
| GetColor | Gets a color property value by name. |
| GetFloat | Gets a float property value by name. |
| GetTexture | Gets a texture property value by name. |
| GetVector | Gets a vector property value by name. |
| IsEmpty | Help verify whether an asset has been assigned or not. |
| SetColor | Sets a color property value by name. |
| SetFloat | Sets a float property value by name. |
| SetTexture | Sets a texture property value by name. |
| SetVector | Sets a vector property value by name. |
Static Methods
Method | Description |
|---|---|
| FromMaterial | Creates a material definition from a Material. |