---
title: TryGetFloat(int, out float)
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/trygetfloat
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/uielements/filterparameterwriter/trygetfloat.md
last_updated: 2026-11-18
generated_at: 2026-11-24T07:19:08.321Z
locale: en-us
---

# TryGetFloat(int, out float)

> Reads a float property that this pass has written, for example through a parameter binding.

## Definition

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

## TryGetFloat(int, float)

```csharp
public bool TryGetFloat(int nameID, out 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, or 0 when the method returns false.

### Returns

| Type                                                          | Description                                            |
| ------------------------------------------------------------- | ------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if this pass has written the property as a float. |

### Remarks

Unlike [FilterParameterWriter.GetOrAddFloatRef](/engine/7000.0/script-reference/unityengine/uielements/filterparameterwriter/getoraddfloatref.md), this method doesn't add the property. It doesn't read the value of the material.
