# Resource

> Represents a file resource to include in the iOS Xcode asset catalog, with optional on-demand resource tags and device-specific variants.

## Definition

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

```csharp
public class Resource
```

## Remarks

A `Resource` maps a named entry in the Xcode asset catalog to one or more source files on disk. Use the two-parameter constructor when the resource has a single source file. Use the one-parameter constructor together with [Resource.BindVariant](/engine/6000.5/script-reference/unityeditor/ios/resource/bindvariant.md) when you need different files for different device configurations. Use [Resource.AddOnDemandResourceTags](/engine/6000.5/script-reference/unityeditor/ios/resource/addondemandresourcetags.md) to mark the resource for on-demand delivery. All methods return the same instance, so calls can be chained.

Additional Resources: [BuildPipeline](/engine/6000.5/script-reference/unityeditor/ios/buildpipeline.md), iOSDeviceRequirement.

## Constructors

| Constructor                                                                                                                         | Description                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [Resource(System.String)](/engine/6000.5/script-reference/unityeditor/ios/resource/ctor.md#resource\(string\))                      | Creates a file resource with the specified name, without a source file path. |
| [Resource(System.String,System.String)](/engine/6000.5/script-reference/unityeditor/ios/resource/ctor.md#resource\(string-string\)) | Creates a file resource with the specified name and source file path.        |

## Methods

| Method                                                                                                         | Description                                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [AddOnDemandResourceTags](/engine/6000.5/script-reference/unityeditor/ios/resource/addondemandresourcetags.md) | Assigns one or more on-demand resource tags to this resource and returns the same instance for method chaining. Duplicate tags are ignored. |
| [BindVariant](/engine/6000.5/script-reference/unityeditor/ios/resource/bindvariant.md)                         | Adds a file variant selected by named extension and returns the same instance for method chaining.                                          |
