Resource
Represents a file resource to include in the iOS Xcode asset catalog, with optional on-demand resource tags and device-specific variants.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Class
- Namespace: UnityEditor.iOS
- Assembly: UnityEditor.Apple.Extensions.Common
public class Resource
Remarks
A 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 when you need different files for different device configurations. Use Resource.AddOnDemandResourceTags to mark the resource for on-demand delivery. All methods return the same instance, so calls can be chained.
ResourceAdditional Resources: BuildPipeline, iOSDeviceRequirement.
Constructors
Constructor | Description |
|---|---|
| Resource(System.String) | Creates a file resource with the specified name, without a source file path. |
| Resource(System.String,System.String) | Creates a file resource with the specified name and source file path. |
Methods
Method | Description |
|---|---|
| AddOnDemandResourceTags | Assigns one or more on-demand resource tags to this resource and returns the same instance for method chaining. Duplicate tags are ignored. |
| BindVariant | Adds a file variant selected by named extension and returns the same instance for method chaining. |