---
title: SetFloat
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/setfloat
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/uielements/filterparameterwriter/setfloat.md
last_updated: 2026-11-18
generated_at: 2026-11-24T07:19:13.289Z
locale: en-us
---

# SetFloat

> Writes a float property.

## Definition

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

## SetFloat(int, float)

Writes a float property.

```csharp
public void SetFloat(int nameID, float 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).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The value that the shader reads.

## SetFloat(string, float)

Writes a float property.

```csharp
public void SetFloat(string name, float value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The property name.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The value that the shader reads.
