Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MaterialDefinition

Describes a VisualElement material.
Read time 1 minuteLast updated 6 days ago

Definition

public struct MaterialDefinition : IEquatable<MaterialDefinition>

Constructors

Constructor

Description

MaterialDefinition(UnityEngine.Material)Creates from a Material.

Properties

Property

Description

materialThe material to use to render the element.

Methods

Method

Description

GetColorGets a color property value by name.
GetFloatGets a float property value by name.
GetTextureGets a texture property value by name.
GetVectorGets a vector property value by name.
IsEmptyHelp verify whether an asset has been assigned or not.
SetColorSets a color property value by name.
SetFloatSets a float property value by name.
SetTextureSets a texture property value by name.
SetVectorSets a vector property value by name.

Static Methods

Method

Description

FromMaterialCreates a material definition from a Material.