# GetFloatValue

> Retrieves the float value that the binding points to.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## GetFloatValue(GameObject, EditorCurveBinding, float)

Retrieves the float value that the binding points to.

```csharp
public static bool GetFloatValue(GameObject root, EditorCurveBinding binding, out float data)
```

### Parameters

**** (\[GameObject]\(/engine/6000.6/script-reference/unityengine/gameobject)): The root GameObject of the animated hierarchy.**** (\[EditorCurveBinding]\(/engine/6000.6/script-reference/unityeditor/editorcurvebinding)): The binding that defines the path and the properties of the value.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The resulting float value, if a value exists.

### Returns

| Type                                                          | Description                                        |
| ------------------------------------------------------------- | -------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns True if the value exists. False otherwise. |

### Remarks

Use this method when recording keyframes.

## GetFloatValue(GameObject, string, Type, string, float)

Samples a curve on the GameObject you pass in and retrieves the current float value.

> **Warning:**
>
> **Deprecated.** This overload is deprecated. Use the one with EditorCurveBinding instead.

```csharp
public static bool GetFloatValue(GameObject root, string relativePath, Type type, string propertyName, out float data)
```

### Parameters

**** (\[GameObject]\(/engine/6000.6/script-reference/unityengine/gameobject)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

Use this method when recording keyframes.
