| Parameter | Description |
|---|---|
| path | Path to the source file for this variant. |
| requirement | Device requirements that select this variant at download time. |
Resource The resulting Resource instance after the operation.
Adds a file variant selected by device requirements and returns the same instance for method chaining.
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.
| Parameter | Description |
|---|---|
| path | Path to the source file for this variant. |
| name | Variant name matching a file extension configured in Player Settings > iOS > On Demand Resources. |
Resource The resulting Resource instance after the operation.
Adds a file variant selected by named extension and returns the same instance for method chaining.
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.