Skip to reading
PCA Script Programming

add_asset_to_scene()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Add Asset to Scene | Action ID: AddAssetToScene

Create a runtime scene entity using an imported asset.

Source table from add_asset_to_scene(), page 125
Option key / fieldMeaning and accepted inputDefault
Asset assetIdChoose an imported asset.Blank
New ID idText.Blank
Name nameText.Blank
XYZ positionDestination/placement coordinates as [X, Y, Z].[0.0, 0.0, 0.0]
Enabled enabledExplicit on/off state for the feature or response.true
Visible visibleExplicit visible/hidden state.true

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
add_asset_to_scene({"assetId": "your_asset", "id": "", "name": "powered"})

In use. Spawn a lantern model at [1,0,-2] with a unique ID. Import and verify the asset first. Repeating the spawn is not the same as showing one existing lantern.

Page 125 of 357Permalink
Go to page