pub struct Material {Show 13 fields
pub m_Name: String,
pub m_SavedProperties: UnityPropertySheet,
pub m_Shader: PPtr,
pub disabledShaderPasses: Option<Vec<String>>,
pub m_BuildTextureStacks: Option<Vec<BuildTextureStackReference>>,
pub m_CustomRenderQueue: Option<i32>,
pub m_DoubleSidedGI: Option<bool>,
pub m_EnableInstancingVariants: Option<bool>,
pub m_InvalidKeywords: Option<Vec<String>>,
pub m_LightmapFlags: Option<u32>,
pub m_ShaderKeywords: Option<Enum_Vec_String___String>,
pub m_ValidKeywords: Option<Vec<String>>,
pub stringTagMap: Option<Vec<(String, String)>>,
}Expand description
Material is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: The material class. This class exposes all properties from a material, allowing you to animate them.
You can also use it to set custom shader properties that can’t be accessed through
the inspector (e.g. matrices).In order to get the material used by an object, use the Renderer.material property.See Also: Materials, Shaders.
Fields§
§m_Name: StringThe name of the object.
m_SavedProperties: UnityPropertySheet§m_Shader: PPtrThe shader used by the material.
PPtr<Shader>: (3.4.0 - 2022.3.2f1)
disabledShaderPasses: Option<Vec<String>>Vec
m_BuildTextureStacks: Option<Vec<BuildTextureStackReference>>Vec
m_CustomRenderQueue: Option<i32>i32: (4.3.0 - 2022.3.2f1)
m_DoubleSidedGI: Option<bool>Gets and sets whether the Double Sided Global Illumination setting is enabled for this material. bool: (5.6.2f1 - 2022.3.2f1)
m_EnableInstancingVariants: Option<bool>bool: (5.6.0f1 - 2022.3.2f1)
m_InvalidKeywords: Option<Vec<String>>Vec
m_LightmapFlags: Option<u32>u32: (5.0.0f4 - 2022.3.2f1)
m_ShaderKeywords: Option<Enum_Vec_String___String>An array containing names of the local shader keywords that are currently enabled for this material.
Vec
m_ValidKeywords: Option<Vec<String>>Vec
stringTagMap: Option<Vec<(String, String)>>Vec<(String, String)>: (5.1.0f1 - 2022.3.2f1)