Optional
data?: AssetDataThe asset data depend on the type of the asset. Asset data are available at runtime.
Optional
exclude?: booleanExclude asset from the project. If true, the asset will not be available at runtime and not be included in published builds.
Optional
file?: {Properties related to the file of the asset.
Optional
variants?: { basis?: object; dxt?: object; etc1?: object; etc2?: object; pvr?: object }[read-only]
Properties for the different variants of the asset file.
Optional
basis?: object[read-only]
Properties for the BASIS variant of the asset file.
Optional
dxt?: object[read-only]
Properties for the DXT variant of the asset file.
Optional
etc1?: object[read-only]
Properties for the ETC1 variant of the asset file.
Optional
etc2?: object[read-only]
Properties for the ETC2 variant of the asset file.
Optional
pvr?: object[read-only]
Properties for the PVR variant of the asset file.
Optional
i18n?: Record<string, string>A dictionary that holds localized versions of the asset file. Each key in the dictionary is the locale and each value is the asset id
.
Optional
id?: number[read-only]
The asset id. This id is the same across different branches.
Optional
meta?: object[read-only]
Asset properties that depend on the type of the asset. Meta properties are available in the PlayCanvas Editor but not at runtime.
Optional
name?: string[read-only]
The name of the asset.
Optional
path?: number[][read-only]
An array of folder asset id
s that represent the full path of the asset, if the asset is under one or more folders.
Optional
preload?: booleanIf true the asset will be loaded during the preload phase of application set up.
Optional
source?: boolean[read-only]
Whether this is a source asset. A source asset is not included at runtime (e.g. FBX) but may have target assets that are generated from it (e.g. model assets).
Optional
source_asset_id?: string[read-only]
The id
of the source asset that generated this asset.
Optional
tags?: string[]An array of asset tags.
Optional
type?: string[read-only]
The type of the asset. Can be: various types listed.
Optional
uniqueId?: number[read-only]
The asset's unique id. This id is different across different branches.
Represents an Asset.
What follows is a reference for all possible asset paths that can be passed to functions such as Asset#get and Asset#set.