Material

More information can be found in the Unity API Reference

Constructors

Constructor

Description

Material(source)

Methods

Method

Description

ComputeCRC()

CopyPropertiesFromMaterial(mat)

DisableKeyword(keyword)

EnableKeyword(keyword)

FindPass(passName)

GetColor(name)

GetColor(nameID)

GetColorArray(name)

GetColorArray(nameID)

GetColorArray(name, values)

GetColorArray(nameID, values)

GetFloat(name)

GetFloat(nameID)

GetFloatArray(name)

GetFloatArray(nameID)

GetFloatArray(name, values)

GetFloatArray(nameID, values)

GetHashCode()

GetInt(name)

GetInt(nameID)

GetMatrix(name)

GetMatrix(nameID)

GetMatrixArray(name)

GetMatrixArray(nameID)

GetMatrixArray(name, values)

GetMatrixArray(nameID, values)

GetPassName(pass)

GetShaderPassEnabled(passName)

GetTag(tag, searchFallbacks)

GetTag(tag, searchFallbacks, defaultValue)

GetTexture(name)

GetTexture(nameID)

GetTextureOffset(name)

GetTextureOffset(nameID)

GetTexturePropertyNameIDs()

GetTexturePropertyNameIDs(outNames)

GetTexturePropertyNames()

GetTexturePropertyNames(outNames)

GetTextureScale(name)

GetTextureScale(nameID)

GetVector(name)

GetVector(nameID)

GetVectorArray(name)

GetVectorArray(nameID)

GetVectorArray(name, values)

GetVectorArray(nameID, values)

HasProperty(nameID)

HasProperty(name)

IsKeywordEnabled(keyword)

Lerp(start, end, t)

SetColor(name, value)

SetColor(nameID, value)

SetColorArray(name, values)

SetColorArray(nameID, values)

SetColorArray(name, values)

SetColorArray(nameID, values)

SetFloat(name, value)

SetFloat(nameID, value)

SetFloatArray(name, values)

SetFloatArray(nameID, values)

SetFloatArray(name, values)

SetFloatArray(nameID, values)

SetInt(name, value)

SetInt(nameID, value)

SetMatrix(name, value)

SetMatrix(nameID, value)

SetMatrixArray(name, values)

SetMatrixArray(nameID, values)

SetMatrixArray(name, values)

SetMatrixArray(nameID, values)

SetOverrideTag(tag, val)

SetPass(pass)

SetShaderPassEnabled(passName, enabled)

SetTexture(name, value)

SetTexture(nameID, value)

SetTextureOffset(name, value)

SetTextureOffset(nameID, value)

SetTextureScale(name, value)

SetTextureScale(nameID, value)

SetVector(name, value)

SetVector(nameID, value)

SetVectorArray(name, values)

SetVectorArray(nameID, values)

SetVectorArray(name, values)

SetVectorArray(nameID, values)

ToString()

Details

class Material
Material Material(Material source)
Color color
bool doubleSidedGI
bool enableInstancing
Texture mainTexture
Vector2 mainTextureOffset
Vector2 mainTextureScale
string name
const int passCount
int renderQueue
array<string> shaderKeywords
int ComputeCRC()
void CopyPropertiesFromMaterial(Material mat)
void DisableKeyword(string keyword)
void EnableKeyword(string keyword)
int FindPass(string passName)
Color GetColor(string name)
Color GetColor(int nameID)
array<Color> GetColorArray(string name)
array<Color> GetColorArray(int nameID)
void GetColorArray(string name, array<Color> values)
void GetColorArray(int nameID, array<Color> values)
float GetFloat(string name)
float GetFloat(int nameID)
array<float> GetFloatArray(string name)
array<float> GetFloatArray(int nameID)
void GetFloatArray(string name, array<float> values)
void GetFloatArray(int nameID, array<float> values)
int GetHashCode()
int GetInt(string name)
int GetInt(int nameID)
Matrix4x4 GetMatrix(string name)
Matrix4x4 GetMatrix(int nameID)
array<Matrix4x4> GetMatrixArray(string name)
array<Matrix4x4> GetMatrixArray(int nameID)
void GetMatrixArray(string name, array<Matrix4x4> values)
void GetMatrixArray(int nameID, array<Matrix4x4> values)
string GetPassName(int pass)
bool GetShaderPassEnabled(string passName)
string GetTag(string tag, bool searchFallbacks)
string GetTag(string tag, bool searchFallbacks, string defaultValue)
Texture GetTexture(string name)
Texture GetTexture(int nameID)
Vector2 GetTextureOffset(string name)
Vector2 GetTextureOffset(int nameID)
array<int> GetTexturePropertyNameIDs()
void GetTexturePropertyNameIDs(array<int> outNames)
array<string> GetTexturePropertyNames()
void GetTexturePropertyNames(array<string> outNames)
Vector2 GetTextureScale(string name)
Vector2 GetTextureScale(int nameID)
Vector4 GetVector(string name)
Vector4 GetVector(int nameID)
array<Vector4> GetVectorArray(string name)
array<Vector4> GetVectorArray(int nameID)
void GetVectorArray(string name, array<Vector4> values)
void GetVectorArray(int nameID, array<Vector4> values)
bool HasProperty(int nameID)
bool HasProperty(string name)
bool IsKeywordEnabled(string keyword)
void Lerp(Material start, Material end, float t)
void SetColor(string name, Color value)
void SetColor(int nameID, Color value)
void SetColorArray(string name, array<Color> values)
void SetColorArray(int nameID, array<Color> values)
void SetColorArray(string name, array<Color> values)
void SetColorArray(int nameID, array<Color> values)
void SetFloat(string name, float value)
void SetFloat(int nameID, float value)
void SetFloatArray(string name, array<float> values)
void SetFloatArray(int nameID, array<float> values)
void SetFloatArray(string name, array<float> values)
void SetFloatArray(int nameID, array<float> values)
void SetInt(string name, int value)
void SetInt(int nameID, int value)
void SetMatrix(string name, Matrix4x4 value)
void SetMatrix(int nameID, Matrix4x4 value)
void SetMatrixArray(string name, array<Matrix4x4> values)
void SetMatrixArray(int nameID, array<Matrix4x4> values)
void SetMatrixArray(string name, array<Matrix4x4> values)
void SetMatrixArray(int nameID, array<Matrix4x4> values)
void SetOverrideTag(string tag, string val)
bool SetPass(int pass)
void SetShaderPassEnabled(string passName, bool enabled)
void SetTexture(string name, Texture value)
void SetTexture(int nameID, Texture value)
void SetTextureOffset(string name, Vector2 value)
void SetTextureOffset(int nameID, Vector2 value)
void SetTextureScale(string name, Vector2 value)
void SetTextureScale(int nameID, Vector2 value)
void SetVector(string name, Vector4 value)
void SetVector(int nameID, Vector4 value)
void SetVectorArray(string name, array<Vector4> values)
void SetVectorArray(int nameID, array<Vector4> values)
void SetVectorArray(string name, array<Vector4> values)
void SetVectorArray(int nameID, array<Vector4> values)
string ToString()