# SetGlobalMatrixArray

> Add a "set global shader matrix array property" command.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.0/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## SetGlobalMatrixArray(int, Matrix4x4\[])

Add a "set global shader matrix array property" command.

```csharp
public void SetGlobalMatrixArray(int nameID, Matrix4x4[] values)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[Matrix4x4\[]]\(/engine/6000.0/script-reference/unityengine/matrix4x4)):&#x20;

### Remarks

When the command buffer will be executed, a global shader matrix array property will be set at this point. The effect is as if [Shader.SetGlobalMatrixArray](/engine/6000.0/script-reference/unityengine/shader/setglobalmatrixarray.md) was called.

## SetGlobalMatrixArray(string, List\<Matrix4x4>)

Add a "set global shader matrix array property" command.

```csharp
public void SetGlobalMatrixArray(string propertyName, List<Matrix4x4> values)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[List\<Matrix4x4>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)):&#x20;

### Remarks

When the command buffer will be executed, a global shader matrix array property will be set at this point. The effect is as if [Shader.SetGlobalMatrixArray](/engine/6000.0/script-reference/unityengine/shader/setglobalmatrixarray.md) was called.

## SetGlobalMatrixArray(int, List\<Matrix4x4>)

Add a "set global shader matrix array property" command.

```csharp
public void SetGlobalMatrixArray(int nameID, List<Matrix4x4> values)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[List\<Matrix4x4>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)):&#x20;

### Remarks

When the command buffer will be executed, a global shader matrix array property will be set at this point. The effect is as if [Shader.SetGlobalMatrixArray](/engine/6000.0/script-reference/unityengine/shader/setglobalmatrixarray.md) was called.

## SetGlobalMatrixArray(string, Matrix4x4\[])

Add a "set global shader matrix array property" command.

```csharp
public void SetGlobalMatrixArray(string propertyName, Matrix4x4[] values)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[Matrix4x4\[]]\(/engine/6000.0/script-reference/unityengine/matrix4x4)):&#x20;

### Remarks

When the command buffer will be executed, a global shader matrix array property will be set at this point. The effect is as if [Shader.SetGlobalMatrixArray](/engine/6000.0/script-reference/unityengine/shader/setglobalmatrixarray.md) was called.
