# FloatProperty

> Draw a property field for a float shader property.

## Definition

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

## FloatProperty(MaterialProperty, string)

Draw a property field for a float shader property.

```csharp
public float FloatProperty(MaterialProperty prop, string label)
```

### Parameters

**** (\[MaterialProperty]\(/engine/6000.6/script-reference/unityeditor/materialproperty)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label for the property.

### Returns

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

## FloatProperty(Rect, MaterialProperty, string)

Draw a property field for a float shader property.

```csharp
public float FloatProperty(Rect position, MaterialProperty prop, string label)
```

### Parameters

**** (\[Rect]\(/engine/6000.6/script-reference/unityengine/rect)): **** (\[MaterialProperty]\(/engine/6000.6/script-reference/unityeditor/materialproperty)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label for the property.

### Returns

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

## FloatProperty(string, string)

Draw a property field for a float shader property.

> **Warning:**
>
> **Deprecated.** Use FloatProperty with MaterialProperty instead.

```csharp
public float FloatProperty(string propertyName, string label)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label for the property.

### Returns

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