# SetGlobalMatrixArray

> Sets a global matrix array property for all shaders.

## Definition

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

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

Sets a global matrix array property for all shaders.

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

### Parameters

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

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalMatrix](/engine/6000.7/script-reference/unityengine/shader/setglobalmatrix.md).

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

Sets a global matrix array property for all shaders.

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

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.7/script-reference/unityengine/shader/propertytoid.md).**** (\[List\<Matrix4x4>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)):&#x20;

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalMatrix](/engine/6000.7/script-reference/unityengine/shader/setglobalmatrix.md).

## SetGlobalMatrixArray(string, Matrix4x4\[])

Sets a global matrix array property for all shaders.

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

### Parameters

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

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalMatrix](/engine/6000.7/script-reference/unityengine/shader/setglobalmatrix.md).

## SetGlobalMatrixArray(int, Matrix4x4\[])

Sets a global matrix array property for all shaders.

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

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.7/script-reference/unityengine/shader/propertytoid.md).**** (\[Matrix4x4\[]]\(/engine/6000.7/script-reference/unityengine/matrix4x4)):&#x20;

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalMatrix](/engine/6000.7/script-reference/unityengine/shader/setglobalmatrix.md).
