C# Класс UnityEngine.MaterialPropertyBlock

A block of material values to apply.

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetFloat ( string name ) : float

Get a float from the property block.

GetFloatArray ( string name ) : float[]

Get a float array from the property block.

GetFloatArray ( int nameID, List values ) : void
GetFloatArray ( string name, List values ) : void
GetMatrix ( int nameID ) : Matrix4x4

Get a matrix from the property block.

GetMatrix ( string name ) : Matrix4x4

Get a matrix from the property block.

GetMatrixArray ( string name ) : UnityEngine.Matrix4x4[]

Get a matrix array from the property block.

GetMatrixArray ( int nameID, List values ) : void
GetMatrixArray ( string name, List values ) : void
GetTexture ( string name ) : Texture

Get a texture from the property block.

GetVector ( int nameID ) : Vector4

Get a vector from the property block.

GetVector ( string name ) : Vector4

Get a vector from the property block.

GetVectorArray ( string name ) : Vector4[]

Get a vector array from the property block.

GetVectorArray ( int nameID, List values ) : void
GetVectorArray ( string name, List values ) : void
MaterialPropertyBlock ( ) : System
SetBuffer ( string name, ComputeBuffer value ) : void

Set a ComputeBuffer property.

SetColor ( int nameID, Color value ) : void

Set a color property.

SetColor ( string name, Color value ) : void

Set a color property.

SetFloat ( string name, float value ) : void

Set a float property.

SetFloatArray ( int nameID, List values ) : void
SetFloatArray ( int nameID, float values ) : void

Set a float array property.

SetFloatArray ( string name, List values ) : void
SetFloatArray ( string name, float values ) : void

Set a float array property.

SetMatrix ( int nameID, Matrix4x4 value ) : void

Set a matrix property.

SetMatrix ( string name, Matrix4x4 value ) : void

Set a matrix property.

SetMatrixArray ( int nameID, List values ) : void
SetMatrixArray ( int nameID, Matrix4x4 values ) : void

Set a matrix array property.

SetMatrixArray ( string name, List values ) : void
SetMatrixArray ( string name, Matrix4x4 values ) : void

Set a matrix array property.

SetTexture ( string name, Texture value ) : void

Set a texture property.

SetVector ( int nameID, Vector4 value ) : void

Set a vector property.

SetVector ( string name, Vector4 value ) : void

Set a vector property.

SetVectorArray ( int nameID, List values ) : void
SetVectorArray ( int nameID, Vector4 values ) : void

Set a vector array property.

SetVectorArray ( string name, List values ) : void
SetVectorArray ( string name, Vector4 values ) : void

Set a vector array property.

Приватные методы

Метод Описание
AddColor ( int nameID, Color value ) : void
AddColor ( string name, Color value ) : void
AddFloat ( int nameID, float value ) : void
AddFloat ( string name, float value ) : void
AddMatrix ( int nameID, Matrix4x4 value ) : void
AddMatrix ( string name, Matrix4x4 value ) : void
AddTexture ( int nameID, Texture value ) : void
AddTexture ( string name, Texture value ) : void
AddVector ( int nameID, Vector4 value ) : void
AddVector ( string name, Vector4 value ) : void
Clear ( ) : void
DestroyBlock ( ) : void
GetFloat ( int nameID ) : float
GetFloatArray ( int nameID ) : float[]
GetFloatArrayImplList ( int nameID, object list ) : void
GetMatrixArray ( int nameID ) : UnityEngine.Matrix4x4[]
GetMatrixArrayImplList ( int nameID, object list ) : void
GetTexture ( int nameID ) : Texture
GetVectorArray ( int nameID ) : Vector4[]
GetVectorArrayImplList ( int nameID, object list ) : void
INTERNAL_CALL_GetMatrix ( MaterialPropertyBlock self, int nameID, Matrix4x4 &value ) : void
INTERNAL_CALL_GetVector ( MaterialPropertyBlock self, int nameID, Vector4 &value ) : void
INTERNAL_CALL_SetColor ( MaterialPropertyBlock self, int nameID, Color &value ) : void
INTERNAL_CALL_SetMatrix ( MaterialPropertyBlock self, int nameID, Matrix4x4 &value ) : void
INTERNAL_CALL_SetVector ( MaterialPropertyBlock self, int nameID, Vector4 &value ) : void
InitBlock ( ) : void
SetBuffer ( int nameID, ComputeBuffer value ) : void
SetFloat ( int nameID, float value ) : void
SetFloatArrayImpl ( int nameID, float values ) : void
SetFloatArrayImplList ( int nameID, object list ) : void
SetMatrixArrayImpl ( int nameID, Matrix4x4 values ) : void
SetMatrixArrayImplList ( int nameID, object list ) : void
SetTexture ( int nameID, Texture value ) : void
SetVectorArrayImpl ( int nameID, Vector4 values ) : void
SetVectorArrayImplList ( int nameID, object list ) : void

Описание методов

GetFloat() публичный Метод

Get a float from the property block.

public GetFloat ( string name ) : float
name string
Результат float

GetFloatArray() публичный Метод

Get a float array from the property block.

public GetFloatArray ( string name ) : float[]
name string
Результат float[]

GetFloatArray() публичный Метод

public GetFloatArray ( int nameID, List values ) : void
nameID int
values List
Результат void

GetFloatArray() публичный Метод

public GetFloatArray ( string name, List values ) : void
name string
values List
Результат void

GetMatrix() публичный Метод

Get a matrix from the property block.

public GetMatrix ( int nameID ) : Matrix4x4
nameID int
Результат Matrix4x4

GetMatrix() публичный Метод

Get a matrix from the property block.

public GetMatrix ( string name ) : Matrix4x4
name string
Результат Matrix4x4

GetMatrixArray() публичный Метод

Get a matrix array from the property block.

public GetMatrixArray ( string name ) : UnityEngine.Matrix4x4[]
name string
Результат UnityEngine.Matrix4x4[]

GetMatrixArray() публичный Метод

public GetMatrixArray ( int nameID, List values ) : void
nameID int
values List
Результат void

GetMatrixArray() публичный Метод

public GetMatrixArray ( string name, List values ) : void
name string
values List
Результат void

GetTexture() публичный Метод

Get a texture from the property block.

public GetTexture ( string name ) : Texture
name string
Результат Texture

GetVector() публичный Метод

Get a vector from the property block.

public GetVector ( int nameID ) : Vector4
nameID int
Результат Vector4

GetVector() публичный Метод

Get a vector from the property block.

public GetVector ( string name ) : Vector4
name string
Результат Vector4

GetVectorArray() публичный Метод

Get a vector array from the property block.

public GetVectorArray ( string name ) : Vector4[]
name string
Результат Vector4[]

GetVectorArray() публичный Метод

public GetVectorArray ( int nameID, List values ) : void
nameID int
values List
Результат void

GetVectorArray() публичный Метод

public GetVectorArray ( string name, List values ) : void
name string
values List
Результат void

MaterialPropertyBlock() публичный Метод

public MaterialPropertyBlock ( ) : System
Результат System

SetBuffer() публичный Метод

Set a ComputeBuffer property.

public SetBuffer ( string name, ComputeBuffer value ) : void
name string The name of the property.
value ComputeBuffer The ComputeBuffer to set.
Результат void

SetColor() публичный Метод

Set a color property.

public SetColor ( int nameID, Color value ) : void
nameID int The name ID of the property retrieved by Shader.PropertyToID.
value Color The Color value to set.
Результат void

SetColor() публичный Метод

Set a color property.

public SetColor ( string name, Color value ) : void
name string The name of the property.
value Color The Color value to set.
Результат void

SetFloat() публичный Метод

Set a float property.

public SetFloat ( string name, float value ) : void
name string The name of the property.
value float The float value to set.
Результат void

SetFloatArray() публичный Метод

public SetFloatArray ( int nameID, List values ) : void
nameID int
values List
Результат void

SetFloatArray() публичный Метод

Set a float array property.

public SetFloatArray ( int nameID, float values ) : void
nameID int The name ID of the property retrieved by Shader.PropertyToID.
values float The array to set.
Результат void

SetFloatArray() публичный Метод

public SetFloatArray ( string name, List values ) : void
name string
values List
Результат void

SetFloatArray() публичный Метод

Set a float array property.

public SetFloatArray ( string name, float values ) : void
name string The name of the property.
values float The array to set.
Результат void

SetMatrix() публичный Метод

Set a matrix property.

public SetMatrix ( int nameID, Matrix4x4 value ) : void
nameID int The name ID of the property retrieved by Shader.PropertyToID.
value Matrix4x4 The matrix value to set.
Результат void

SetMatrix() публичный Метод

Set a matrix property.

public SetMatrix ( string name, Matrix4x4 value ) : void
name string The name of the property.
value Matrix4x4 The matrix value to set.
Результат void

SetMatrixArray() публичный Метод

public SetMatrixArray ( int nameID, List values ) : void
nameID int
values List
Результат void

SetMatrixArray() публичный Метод

Set a matrix array property.

public SetMatrixArray ( int nameID, Matrix4x4 values ) : void
nameID int The array to set.
values Matrix4x4 The name ID of the property retrieved by Shader.PropertyToID.
Результат void

SetMatrixArray() публичный Метод

public SetMatrixArray ( string name, List values ) : void
name string
values List
Результат void

SetMatrixArray() публичный Метод

Set a matrix array property.

public SetMatrixArray ( string name, Matrix4x4 values ) : void
name string The name of the property.
values Matrix4x4 The name ID of the property retrieved by Shader.PropertyToID.
Результат void

SetTexture() публичный Метод

Set a texture property.

public SetTexture ( string name, Texture value ) : void
name string The name of the property.
value Texture The Texture to set.
Результат void

SetVector() публичный Метод

Set a vector property.

public SetVector ( int nameID, Vector4 value ) : void
nameID int The name ID of the property retrieved by Shader.PropertyToID.
value Vector4 The Vector4 value to set.
Результат void

SetVector() публичный Метод

Set a vector property.

public SetVector ( string name, Vector4 value ) : void
name string The name of the property.
value Vector4 The Vector4 value to set.
Результат void

SetVectorArray() публичный Метод

public SetVectorArray ( int nameID, List values ) : void
nameID int
values List
Результат void

SetVectorArray() публичный Метод

Set a vector array property.

public SetVectorArray ( int nameID, Vector4 values ) : void
nameID int The name of the property.
values Vector4 The name ID of the property retrieved by Shader.PropertyToID.
Результат void

SetVectorArray() публичный Метод

public SetVectorArray ( string name, List values ) : void
name string
values List
Результат void

SetVectorArray() публичный Метод

Set a vector array property.

public SetVectorArray ( string name, Vector4 values ) : void
name string The array to set.
values Vector4 The name ID of the property retrieved by Shader.PropertyToID.
Результат void