# SetGlobalFloatArray

> Sets a global float array property for all shaders.

## Definition

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

## SetGlobalFloatArray(string, List\<float>)

Sets a global float array property for all shaders.

```csharp
public static void SetGlobalFloatArray(string name, List<float> values)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.**** (\[List\<float>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)):&#x20;

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalFloat](/engine/6000.3/script-reference/unityengine/shader/setglobalfloat.md).

## SetGlobalFloatArray(int, List\<float>)

Sets a global float array property for all shaders.

```csharp
public static void SetGlobalFloatArray(int nameID, List<float> values)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.3/script-reference/unityengine/shader/propertytoid.md).**** (\[List\<float>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)):&#x20;

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalFloat](/engine/6000.3/script-reference/unityengine/shader/setglobalfloat.md).

## SetGlobalFloatArray(string, float\[])

Sets a global float array property for all shaders.

```csharp
public static void SetGlobalFloatArray(string name, float[] values)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.**** (\[float\[]]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalFloat](/engine/6000.3/script-reference/unityengine/shader/setglobalfloat.md).

## SetGlobalFloatArray(int, float\[])

Sets a global float array property for all shaders.

```csharp
public static void SetGlobalFloatArray(int nameID, float[] values)
```

### Parameters

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

### Remarks

Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in `Properties` block).

Additional Resources: [Shader.SetGlobalFloat](/engine/6000.3/script-reference/unityengine/shader/setglobalfloat.md).
