Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Resource

Creates a file resource with the specified name, without a source file path.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Constructor
  • Namespace: UnityEditor.iOS
  • Assembly: UnityEditor.Apple.Extensions.Common

Resource(string)

Creates a file resource with the specified name, without a source file path.
public Resource(string name)

Parameters

name

Asset catalog entry name for this resource.

Remarks

Use this constructor when you intend to supply device-specific files using Resource.BindVariant. 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.
public Resource(string name, string path)

Parameters

name

Asset catalog entry name for this resource.

path

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 on a resource created with this constructor; doing so throws an exception.