scene-update-object-list
Update an object list in a scene by specifying the scene id, list id, and a new array of game object ids. Optionally assign a label and scope.
Instructions
Update an Object List, which is an array with the ids of game objects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The id of the object list to update. | |
| label | No | Label of the object. It is used to name the object in the scene and as the variable name in code. | |
| scope | No | The scope of the variable. By default, the editor may generate or not a variable ('local' scope). It depends on if it needs a variable to update the object just after the creation. However, you can force to generate a variable and assign a scope to it, so you can access the object from different parts of the code. When you set a 'public' scope, the editor generates a public field in the class. The same with the `class` scope, but the field is private (in TypeScript). The 'method' scope says to the editor to generate a local variable. The 'nested_prefab' scope is like the public scope but also indicates that the object is a nested prefab. | |
| sceneId | Yes | The `id` of the scene. The `id` is not the name of the scene, else a unique identifier is set in the scene data. You need to read the scene data to get the `id`. | |
| objectIds | Yes | The ids of the game objects in the list. The ids are used to reference the game objects in the scene. |