# GetGlobalFloat

> Gets a global float property for all shaders previously set using Shader.SetGlobalFloat.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## GetGlobalFloat(string)

Gets a global float property for all shaders previously set using [Shader.SetGlobalFloat](/engine/6000.0/script-reference/unityengine/shader/setglobalfloat.md).

```csharp
public static float GetGlobalFloat(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) |             |

## GetGlobalFloat(int)

Gets a global float property for all shaders previously set using [Shader.SetGlobalFloat](/engine/6000.0/script-reference/unityengine/shader/setglobalfloat.md).

```csharp
public static float GetGlobalFloat(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.0/script-reference/unityengine/shader/propertytoid.md).

### Returns

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