# GetFloat

> Use this method to get the value of a named float property from the VFXEventAttribute.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.VFX](/engine/6000.5/script-reference/unityengine/vfx.md)
* **Assembly:** UnityEngine.VFXModule

## GetFloat(int)

Use this method to get the value of a named float property from the VFXEventAttribute.

```csharp
public float GetFloat(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The ID of the property. This is the same ID that [Shader.PropertyToID](/engine/6000.5/script-reference/unityengine/shader/propertytoid.md) returns.

### Returns

| Type                                                          | Description                                                                                                                                                                         |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value for the float you specify. Returns /0.0f/ if [VFXEventAttribute.HasFloat](/engine/6000.5/script-reference/unityengine/vfx/vfxeventattribute/hasfloat.md) returns `false`. |

## GetFloat(string)

Use this method to get the value of a named float property from the VFXEventAttribute.

```csharp
public float GetFloat(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                          | Description                                                                                                                                                                         |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value for the float you specify. Returns /0.0f/ if [VFXEventAttribute.HasFloat](/engine/6000.5/script-reference/unityengine/vfx/vfxeventattribute/hasfloat.md) returns `false`. |
