Loads all assets in the current project / branch. Does not subscribe to realtime changes.
Optional
view?: 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.
Optional
view?: 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.
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 anim state graph asset.
The new asset
Creates new bundle asset
The new asset
Creates new CSS asset
The new asset
Creates new cubemap asset
Optional
anisotropy?: numberCubemap anisotropy value. Defaults to 1.
Optional
folder?: AssetThe parent folder asset
Optional
magFilter?: numberCubemap magFilter value. Defaults to pc.FILTER_LINEAR.
Optional
minFilter?: numberCubemap minFilter value. Defaults to pc.FILTER_LINEAR_MIPMAP_LINEAR.
Optional
name?: stringThe asset name
Optional
onProgress?: FunctionFunction to report progress
Optional
preload?: booleanWhether to preload the asset. Defaults to true.
Optional
textures?: any[]The textures for each cubemap face in this order: right, left, up, down, front, back
The new asset
Creates new HTML asset
The new asset
Creates new localization JSON asset
Optional
folder?: AssetThe parent folder asset
Optional
localizationData?: objectThe localization data. If null then default data will be used.
Optional
name?: stringThe asset name
Optional
onProgress?: FunctionFunction to report progress
Optional
preload?: booleanWhether to preload the asset. Defaults to true.
The new asset
Creates new JSON asset
Optional
folder?: AssetThe parent folder asset
Optional
json?: objectThe JSON
Optional
name?: stringThe asset name
Optional
onProgress?: FunctionFunction to report progress
Optional
preload?: booleanWhether to preload the asset. Defaults to true.
Optional
spaces?: numberThe number of spaces used for indentation. Defaults to 0 (tightly packed output).
The new asset
Creates new material asset
Optional
data?: Record<string, any>The material data. Default values will be used for missing fields. See Asset for material data.
Optional
folder?: AssetThe parent folder asset
Optional
name?: stringThe asset name
Optional
onProgress?: FunctionFunction to report progress
Optional
preload?: booleanWhether to preload the asset. Defaults to true.
The new asset
Creates new script asset
Optional
data?: objectThe script data. See Asset for Script data.
Optional
filename?: 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.
Optional
folder?: AssetThe parent folder asset
Optional
onProgress?: FunctionFunction to report progress
Optional
preload?: booleanWhether to preload the asset. Defaults to true.
Optional
text?: stringThe contents of the script. If none then boilerplate code will be used.
The new asset
Creates new shader asset
The new asset
Creates new sprite asset
Optional
folder?: AssetThe parent folder asset
Optional
frameKeys?: any[]The sprite's frame keys
Optional
name?: stringThe asset name
Optional
onProgress?: FunctionFunction to report progress
Optional
pixelsPerUnit?: numberThe sprite's pixels per unit value. Defaults to 100.
Optional
preload?: booleanWhether to preload the asset. Defaults to true.
Optional
renderMode?: numberThe sprite's render mode. Defaults to pc.SPRITE_RENDERMODE_SIMPLE.
Optional
textureAtlas?: AssetThe sprite's texture atlas asset
The new asset
Creates new template asset
The new asset
Creates new text asset
The new asset
Instantiates the specified template assets under the specified parent entity.
The template assets.
The parent entity
Optional
extraData?: objectExtra data passed to the backend. Used by the Editor on specific cases.
Optional
history?: booleanWhether to record a history action.
Optional
index?: numberThe desired index under the parent to instantiate the templates.
Optional
select?: 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