Show / Hide Table of Contents

Class MaterialPropertyBlock

Inheritance
Object
MaterialPropertyBlock
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public sealed class MaterialPropertyBlock

Constructors

| Improve this Doc View Source

MaterialPropertyBlock()

Declaration
public MaterialPropertyBlock()

Properties

isEmpty

Declaration
public bool isEmpty { get; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AddColor(Int32, Color)

Declaration
[Obsolete("Use SetColor instead (UnityUpgradable) -> SetColor(*)", false)]
public void AddColor(int nameID, Color value)
Parameters
Type Name Description
Int32 nameID
Color value
| Improve this Doc View Source

AddColor(String, Color)

Declaration
[Obsolete("Use SetColor instead (UnityUpgradable) -> SetColor(*)", false)]
public void AddColor(string name, Color value)
Parameters
Type Name Description
String name
Color value
| Improve this Doc View Source

AddFloat(Int32, Single)

Declaration
[Obsolete("Use SetFloat instead (UnityUpgradable) -> SetFloat(*)", false)]
public void AddFloat(int nameID, float value)
Parameters
Type Name Description
Int32 nameID
Single value
| Improve this Doc View Source

AddFloat(String, Single)

Declaration
[Obsolete("Use SetFloat instead (UnityUpgradable) -> SetFloat(*)", false)]
public void AddFloat(string name, float value)
Parameters
Type Name Description
String name
Single value
| Improve this Doc View Source

AddMatrix(Int32, Matrix4x4)

Declaration
[Obsolete("Use SetMatrix instead (UnityUpgradable) -> SetMatrix(*)", false)]
public void AddMatrix(int nameID, Matrix4x4 value)
Parameters
Type Name Description
Int32 nameID
Matrix4x4 value
| Improve this Doc View Source

AddMatrix(String, Matrix4x4)

Declaration
[Obsolete("Use SetMatrix instead (UnityUpgradable) -> SetMatrix(*)", false)]
public void AddMatrix(string name, Matrix4x4 value)
Parameters
Type Name Description
String name
Matrix4x4 value
| Improve this Doc View Source

AddTexture(Int32, Texture)

Declaration
[Obsolete("Use SetTexture instead (UnityUpgradable) -> SetTexture(*)", false)]
public void AddTexture(int nameID, Texture value)
Parameters
Type Name Description
Int32 nameID
Texture value
| Improve this Doc View Source

AddTexture(String, Texture)

Declaration
[Obsolete("Use SetTexture instead (UnityUpgradable) -> SetTexture(*)", false)]
public void AddTexture(string name, Texture value)
Parameters
Type Name Description
String name
Texture value
| Improve this Doc View Source

AddVector(Int32, Vector4)

Declaration
[Obsolete("Use SetVector instead (UnityUpgradable) -> SetVector(*)", false)]
public void AddVector(int nameID, Vector4 value)
Parameters
Type Name Description
Int32 nameID
Vector4 value
| Improve this Doc View Source

AddVector(String, Vector4)

Declaration
[Obsolete("Use SetVector instead (UnityUpgradable) -> SetVector(*)", false)]
public void AddVector(string name, Vector4 value)
Parameters
Type Name Description
String name
Vector4 value
| Improve this Doc View Source

Clear()

Declaration
public void Clear()
| Improve this Doc View Source

CopyProbeOcclusionArrayFrom(List<Vector4>)

Declaration
public void CopyProbeOcclusionArrayFrom(List<Vector4> occlusionProbes)
Parameters
Type Name Description
List<Vector4> occlusionProbes
| Improve this Doc View Source

CopyProbeOcclusionArrayFrom(List<Vector4>, Int32, Int32, Int32)

Declaration
public void CopyProbeOcclusionArrayFrom(List<Vector4> occlusionProbes, int sourceStart, int destStart, int count)
Parameters
Type Name Description
List<Vector4> occlusionProbes
Int32 sourceStart
Int32 destStart
Int32 count
| Improve this Doc View Source

CopyProbeOcclusionArrayFrom(Vector4[])

Declaration
public void CopyProbeOcclusionArrayFrom(Vector4[] occlusionProbes)
Parameters
Type Name Description
Vector4[] occlusionProbes
| Improve this Doc View Source

CopyProbeOcclusionArrayFrom(Vector4[], Int32, Int32, Int32)

Declaration
public void CopyProbeOcclusionArrayFrom(Vector4[] occlusionProbes, int sourceStart, int destStart, int count)
Parameters
Type Name Description
Vector4[] occlusionProbes
Int32 sourceStart
Int32 destStart
Int32 count
| Improve this Doc View Source

CopySHCoefficientArraysFrom(List<SphericalHarmonicsL2>)

Declaration
public void CopySHCoefficientArraysFrom(List<SphericalHarmonicsL2> lightProbes)
Parameters
Type Name Description
List<SphericalHarmonicsL2> lightProbes
| Improve this Doc View Source

CopySHCoefficientArraysFrom(List<SphericalHarmonicsL2>, Int32, Int32, Int32)

Declaration
public void CopySHCoefficientArraysFrom(List<SphericalHarmonicsL2> lightProbes, int sourceStart, int destStart, int count)
Parameters
Type Name Description
List<SphericalHarmonicsL2> lightProbes
Int32 sourceStart
Int32 destStart
Int32 count
| Improve this Doc View Source

CopySHCoefficientArraysFrom(SphericalHarmonicsL2[])

Declaration
public void CopySHCoefficientArraysFrom(SphericalHarmonicsL2[] lightProbes)
Parameters
Type Name Description
SphericalHarmonicsL2[] lightProbes
| Improve this Doc View Source

CopySHCoefficientArraysFrom(SphericalHarmonicsL2[], Int32, Int32, Int32)

Declaration
public void CopySHCoefficientArraysFrom(SphericalHarmonicsL2[] lightProbes, int sourceStart, int destStart, int count)
Parameters
Type Name Description
SphericalHarmonicsL2[] lightProbes
Int32 sourceStart
Int32 destStart
Int32 count
| Improve this Doc View Source

Finalize()

Declaration
protected void Finalize()
| Improve this Doc View Source

GetColor(Int32)

Declaration
public Color GetColor(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Color
| Improve this Doc View Source

GetColor(String)

Declaration
public Color GetColor(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Color
| Improve this Doc View Source

GetFloat(Int32)

Declaration
public float GetFloat(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Single
| Improve this Doc View Source

GetFloat(String)

Declaration
public float GetFloat(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Single
| Improve this Doc View Source

GetFloatArray(Int32)

Declaration
public float[] GetFloatArray(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Single[]
| Improve this Doc View Source

GetFloatArray(Int32, List<Single>)

Declaration
public void GetFloatArray(int nameID, List<float> values)
Parameters
Type Name Description
Int32 nameID
List<Single> values
| Improve this Doc View Source

GetFloatArray(String)

Declaration
public float[] GetFloatArray(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Single[]
| Improve this Doc View Source

GetFloatArray(String, List<Single>)

Declaration
public void GetFloatArray(string name, List<float> values)
Parameters
Type Name Description
String name
List<Single> values
| Improve this Doc View Source

GetInt(Int32)

Declaration
public int GetInt(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Int32
| Improve this Doc View Source

GetInt(String)

Declaration
public int GetInt(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Int32
| Improve this Doc View Source

GetMatrix(Int32)

Declaration
public Matrix4x4 GetMatrix(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Matrix4x4
| Improve this Doc View Source

GetMatrix(String)

Declaration
public Matrix4x4 GetMatrix(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Matrix4x4
| Improve this Doc View Source

GetMatrixArray(Int32)

Declaration
public Matrix4x4[] GetMatrixArray(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Matrix4x4[]
| Improve this Doc View Source

GetMatrixArray(Int32, List<Matrix4x4>)

Declaration
public void GetMatrixArray(int nameID, List<Matrix4x4> values)
Parameters
Type Name Description
Int32 nameID
List<Matrix4x4> values
| Improve this Doc View Source

GetMatrixArray(String)

Declaration
public Matrix4x4[] GetMatrixArray(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Matrix4x4[]
| Improve this Doc View Source

GetMatrixArray(String, List<Matrix4x4>)

Declaration
public void GetMatrixArray(string name, List<Matrix4x4> values)
Parameters
Type Name Description
String name
List<Matrix4x4> values
| Improve this Doc View Source

GetTexture(Int32)

Declaration
public Texture GetTexture(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Texture
| Improve this Doc View Source

GetTexture(String)

Declaration
public Texture GetTexture(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Texture
| Improve this Doc View Source

GetVector(Int32)

Declaration
public Vector4 GetVector(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Vector4
| Improve this Doc View Source

GetVector(String)

Declaration
public Vector4 GetVector(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Vector4
| Improve this Doc View Source

GetVectorArray(Int32)

Declaration
public Vector4[] GetVectorArray(int nameID)
Parameters
Type Name Description
Int32 nameID
Returns
Type Description
Vector4[]
| Improve this Doc View Source

GetVectorArray(Int32, List<Vector4>)

Declaration
public void GetVectorArray(int nameID, List<Vector4> values)
Parameters
Type Name Description
Int32 nameID
List<Vector4> values
| Improve this Doc View Source

GetVectorArray(String)

Declaration
public Vector4[] GetVectorArray(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Vector4[]
| Improve this Doc View Source

GetVectorArray(String, List<Vector4>)

Declaration
public void GetVectorArray(string name, List<Vector4> values)
Parameters
Type Name Description
String name
List<Vector4> values
| Improve this Doc View Source

SetBuffer(Int32, ComputeBuffer)

Declaration
public void SetBuffer(int nameID, ComputeBuffer value)
Parameters
Type Name Description
Int32 nameID
ComputeBuffer value
| Improve this Doc View Source

SetBuffer(String, ComputeBuffer)

Declaration
public void SetBuffer(string name, ComputeBuffer value)
Parameters
Type Name Description
String name
ComputeBuffer value
| Improve this Doc View Source

SetColor(Int32, Color)

Declaration
public void SetColor(int nameID, Color value)
Parameters
Type Name Description
Int32 nameID
Color value
| Improve this Doc View Source

SetColor(String, Color)

Declaration
public void SetColor(string name, Color value)
Parameters
Type Name Description
String name
Color value
| Improve this Doc View Source

SetFloat(Int32, Single)

Declaration
public void SetFloat(int nameID, float value)
Parameters
Type Name Description
Int32 nameID
Single value
| Improve this Doc View Source

SetFloat(String, Single)

Declaration
public void SetFloat(string name, float value)
Parameters
Type Name Description
String name
Single value
| Improve this Doc View Source

SetFloatArray(Int32, List<Single>)

Declaration
public void SetFloatArray(int nameID, List<float> values)
Parameters
Type Name Description
Int32 nameID
List<Single> values
| Improve this Doc View Source

SetFloatArray(Int32, Single[])

Declaration
public void SetFloatArray(int nameID, float[] values)
Parameters
Type Name Description
Int32 nameID
Single[] values
| Improve this Doc View Source

SetFloatArray(String, List<Single>)

Declaration
public void SetFloatArray(string name, List<float> values)
Parameters
Type Name Description
String name
List<Single> values
| Improve this Doc View Source

SetFloatArray(String, Single[])

Declaration
public void SetFloatArray(string name, float[] values)
Parameters
Type Name Description
String name
Single[] values
| Improve this Doc View Source

SetInt(Int32, Int32)

Declaration
public void SetInt(int nameID, int value)
Parameters
Type Name Description
Int32 nameID
Int32 value
| Improve this Doc View Source

SetInt(String, Int32)

Declaration
public void SetInt(string name, int value)
Parameters
Type Name Description
String name
Int32 value
| Improve this Doc View Source

SetMatrix(Int32, Matrix4x4)

Declaration
public void SetMatrix(int nameID, Matrix4x4 value)
Parameters
Type Name Description
Int32 nameID
Matrix4x4 value
| Improve this Doc View Source

SetMatrix(String, Matrix4x4)

Declaration
public void SetMatrix(string name, Matrix4x4 value)
Parameters
Type Name Description
String name
Matrix4x4 value
| Improve this Doc View Source

SetMatrixArray(Int32, List<Matrix4x4>)

Declaration
public void SetMatrixArray(int nameID, List<Matrix4x4> values)
Parameters
Type Name Description
Int32 nameID
List<Matrix4x4> values
| Improve this Doc View Source

SetMatrixArray(Int32, Matrix4x4[])

Declaration
public void SetMatrixArray(int nameID, Matrix4x4[] values)
Parameters
Type Name Description
Int32 nameID
Matrix4x4[] values
| Improve this Doc View Source

SetMatrixArray(String, List<Matrix4x4>)

Declaration
public void SetMatrixArray(string name, List<Matrix4x4> values)
Parameters
Type Name Description
String name
List<Matrix4x4> values
| Improve this Doc View Source

SetMatrixArray(String, Matrix4x4[])

Declaration
public void SetMatrixArray(string name, Matrix4x4[] values)
Parameters
Type Name Description
String name
Matrix4x4[] values
| Improve this Doc View Source

SetTexture(Int32, Texture)

Declaration
public void SetTexture(int nameID, Texture value)
Parameters
Type Name Description
Int32 nameID
Texture value
| Improve this Doc View Source

SetTexture(String, Texture)

Declaration
public void SetTexture(string name, Texture value)
Parameters
Type Name Description
String name
Texture value
| Improve this Doc View Source

SetVector(Int32, Vector4)

Declaration
public void SetVector(int nameID, Vector4 value)
Parameters
Type Name Description
Int32 nameID
Vector4 value
| Improve this Doc View Source

SetVector(String, Vector4)

Declaration
public void SetVector(string name, Vector4 value)
Parameters
Type Name Description
String name
Vector4 value
| Improve this Doc View Source

SetVectorArray(Int32, List<Vector4>)

Declaration
public void SetVectorArray(int nameID, List<Vector4> values)
Parameters
Type Name Description
Int32 nameID
List<Vector4> values
| Improve this Doc View Source

SetVectorArray(Int32, Vector4[])

Declaration
public void SetVectorArray(int nameID, Vector4[] values)
Parameters
Type Name Description
Int32 nameID
Vector4[] values
| Improve this Doc View Source

SetVectorArray(String, List<Vector4>)

Declaration
public void SetVectorArray(string name, List<Vector4> values)
Parameters
Type Name Description
String name
List<Vector4> values
| Improve this Doc View Source

SetVectorArray(String, Vector4[])

Declaration
public void SetVectorArray(string name, Vector4[] values)
Parameters
Type Name Description
String name
Vector4[] values

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX