---
title: SetMatrix
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/uielements/filterparameterwriter/setmatrix
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/uielements/filterparameterwriter/setmatrix.md
last_updated: 2026-11-18
generated_at: 2026-11-24T07:19:28.249Z
locale: en-us
---

# SetMatrix

> Writes a matrix property.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/7000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## SetMatrix(int, Matrix4x4)

Writes a matrix property.

```csharp
public void SetMatrix(int nameID, in Matrix4x4 value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The property ID, from [Shader.PropertyToID](/engine/7000.0/script-reference/unityengine/shader/propertytoid.md).**** (\[Matrix4x4]\(/engine/7000.0/script-reference/unityengine/matrix4x4)): The value that the shader reads.

## SetMatrix(string, Matrix4x4)

Writes a matrix property.

```csharp
public void SetMatrix(string name, in Matrix4x4 value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The property name.**** (\[Matrix4x4]\(/engine/7000.0/script-reference/unityengine/matrix4x4)): The value that the shader reads.
