# Resource

> Creates a file resource with the specified name, without a source file path.

## Definition

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

## Resource(string)

Creates a file resource with the specified name, without a source file path.

```csharp
public Resource(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Asset catalog entry name for this resource.

### Remarks

Use this constructor when you intend to supply device-specific files using [Resource.BindVariant](/engine/6000.5/script-reference/unityeditor/ios/resource/bindvariant.md). Don't use this constructor if the resource has a single source file; use the two-parameter constructor instead.

## Resource(string, string)

Creates a file resource with the specified name and source file path.

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

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Asset catalog entry name for this resource.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path to the source file to include in the asset catalog.

### Remarks

Unity copies the file at `path` into the `UnityData.xcassets` catalog under `name`. Don't call [Resource.BindVariant](/engine/6000.5/script-reference/unityeditor/ios/resource/bindvariant.md) on a resource created with this constructor; doing so throws an exception.
