Removes all assets from the list
Loads all assets in the current project / branch. Does not subscribe to realtime changes.
Optionalview?: stringThe desired view for the REST API e.g 'designer', 'shader-editor'. This might limit the assets returned to a smaller subset depending on the view.
Loads all assets in the current project / branch and subscribes to changes.
Optionalview?: stringThe desired view for the REST API e.g 'designer', 'shader-editor'. This might limit the assets returned to a smaller subset depending on the view.
Constructor
OptionalautoSubscribe?: booleanWhether to auto subscribe to asset changes when assets are loaded.
Gets the default callback called when on asset upload succeeds.
Sets the default callback called when on asset upload succeeds. The function takes 2 arguments: the upload id, and the new asset.
Gets the default callback called when on asset upload fails.
Sets the default callback called when on asset upload progress. The function takes 2 arguments: the upload id, and the error.
Gets the default callback called when on asset upload progress.
Sets the default callback called when on asset upload progress. The function takes 2 arguments: the upload id and the progress.
Gets the callback which parses script assets.
Sets the callback which parses script assets. When this callback is set, new script assets will be parsed after they are created. The function takes the asset as a parameter and returns a promise with a list of script names when it is done parsing.
Creates new cubemap asset
Optionalanisotropy?: numberCubemap anisotropy value. Defaults to 1.
Optionalfolder?: AssetThe parent folder asset
OptionalmagFilter?: numberCubemap magFilter value. Defaults to pc.FILTER_LINEAR.
OptionalminFilter?: numberCubemap minFilter value. Defaults to pc.FILTER_LINEAR_MIPMAP_LINEAR.
Optionalname?: stringThe asset name
OptionalonProgress?: FunctionFunction to report progress
Optionalpreload?: booleanWhether to preload the asset. Defaults to true.
Optionaltextures?: any[]The textures for each cubemap face in this order: right, left, up, down, front, back
The new asset
Creates new localization JSON asset
Optionalfolder?: AssetThe parent folder asset
OptionallocalizationData?: objectThe localization data. If null then default data will be used.
Optionalname?: stringThe asset name
OptionalonProgress?: FunctionFunction to report progress
Optionalpreload?: booleanWhether to preload the asset. Defaults to true.
The new asset
Creates new JSON asset
Optionalfolder?: AssetThe parent folder asset
Optionaljson?: objectThe JSON
Optionalname?: stringThe asset name
OptionalonProgress?: FunctionFunction to report progress
Optionalpreload?: booleanWhether to preload the asset. Defaults to true.
Optionalspaces?: numberThe number of spaces used for indentation. Defaults to 0 (tightly packed output).
The new asset
Creates new material asset
Optionaldata?: Record<string, any>The material data. Default values will be used for missing fields. See Asset for material data.
Optionalfolder?: AssetThe parent folder asset
Optionalname?: stringThe asset name
OptionalonProgress?: FunctionFunction to report progress
Optionalpreload?: booleanWhether to preload the asset. Defaults to true.
The new asset
Creates new script asset
Optionaldata?: objectThe script data. See Asset for Script data.
Optionalfilename?: stringThe filename of the script. This will also be the name of the script asset. If not defined it will be generated from the name of the script.
Optionalfolder?: AssetThe parent folder asset
OptionalonProgress?: FunctionFunction to report progress
Optionalpreload?: booleanWhether to preload the asset. Defaults to true.
Optionaltext?: stringThe contents of the script. If none then boilerplate code will be used.
The new asset
Creates new sprite asset
Optionalfolder?: AssetThe parent folder asset
OptionalframeKeys?: any[]The sprite's frame keys
Optionalname?: stringThe asset name
OptionalonProgress?: FunctionFunction to report progress
OptionalpixelsPerUnit?: numberThe sprite's pixels per unit value. Defaults to 100.
Optionalpreload?: booleanWhether to preload the asset. Defaults to true.
OptionalrenderMode?: numberThe sprite's render mode. Defaults to pc.SPRITE_RENDERMODE_SIMPLE.
OptionaltextureAtlas?: AssetThe sprite's texture atlas asset
The new asset
Gets assets that satisfy function
The function (takes an asset as an argument and returns boolean).
The assets
Finds first asset that satisfies function
A function that takes an asset as an argument and returns boolean.
The asset
Gets the first script asset that contains the specified script
The script name
The script asset
Instantiates the specified template assets under the specified parent entity.
The template assets.
The parent entity
OptionalextraData?: objectExtra data passed to the backend. Used by the Editor on specific cases.
Optionalhistory?: booleanWhether to record a history action.
Optionalindex?: numberThe desired index under the parent to instantiate the templates.
Optionalselect?: booleanWhether to select the new entities.
The new entities
Finds all assets with specified tags
The tags. If multiple tags are specified then assets that contain ANY of the specified tags will be included. If an argument is an array of tags then assets that contain ALL of the tags in the array will be included.
The assets
Creates new asset
The asset fields
Import settings
Function to report progress
The new asset
The Assets Editor API