# BindVariant

> Adds a file variant selected by device requirements and returns the same instance for method chaining.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.iOS](/engine/6000.6/script-reference/unityeditor/ios.md)
* **Assembly:** UnityEditor.Apple.Extensions.Common

## BindVariant(string, iOSDeviceRequirement)

Adds a file variant selected by device requirements and returns the same instance for method chaining.

```csharp
public Resource BindVariant(string path, iOSDeviceRequirement requirement)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path to the source file for this variant.**** (\[iOSDeviceRequirement]\(/engine/6000.6/script-reference/unityeditor/iosdevicerequirement)): Device requirements that select this variant at download time.

### Returns

| Type                                                                    | Description                                                                                                         |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [Resource](/engine/6000.6/script-reference/unityeditor/ios/resource.md) | The resulting [Resource](/engine/6000.6/script-reference/unityeditor/ios/resource.md) instance after the operation. |

### Remarks

Use this overload to select a variant based on hardware capabilities such as memory or graphics tier. Call this method multiple times to register variants for different device profiles. This method throws an exception if called on a resource created with a source file path.

## BindVariant(string, string)

Adds a file variant selected by named extension and returns the same instance for method chaining.

```csharp
public Resource BindVariant(string path, string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path to the source file for this variant.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Variant name matching a file extension configured in **Player Settings** > **iOS** > **On Demand Resources**.

### Returns

| Type                                                                    | Description                                                                                                         |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [Resource](/engine/6000.6/script-reference/unityeditor/ios/resource.md) | The resulting [Resource](/engine/6000.6/script-reference/unityeditor/ios/resource.md) instance after the operation. |

### Remarks

Use this overload to select a variant by a named file extension whose device requirements you configure separately in **Player Settings** > **iOS** > **On Demand Resources**. Call this method multiple times to register variants for different configurations. This method throws an exception if called on a resource created with a source file path.
