reparent_entity
Change the parent of an entity in PlayCanvas Editor, allowing reorganization of 3D scene hierarchies while optionally preserving its transform for accurate positioning.
Instructions
Reparent an entity
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | An entity ID. | |
| index | No | ||
| parent | Yes | ||
| preserveTransform | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "An entity ID.",
"format": "uuid",
"type": "string"
},
"index": {
"type": "number"
},
"parent": {
"$ref": "#/properties/id"
},
"preserveTransform": {
"type": "boolean"
}
},
"required": [
"id",
"parent"
],
"type": "object"
}