核心组件
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 Details 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲怎么用的正文在
每条目所链接的指南里。字段说明取自 C++ ES_PROPERTY 处的原文,因此为英文。
Children
The entity's children, maintained by the engine alongside `Parent`. Its order is the order children draw in.
Explained in core-concepts/transforms.
| Field | Type | Default | Notes |
|---|---|---|---|
entities | Entity | |
Disabled
Tag added by `setEntityActive(false)`: an entity counts as active exactly while it is absent.
Explained in core-concepts/components.
A tag — it carries no fields.
Name
The entity's display name — what the World Outliner shows and what name lookups resolve against.
Explained in core-concepts/components.
| Field | Type | Default | Notes |
|---|---|---|---|
value | string | empty |
Parent
The entity this one hangs under. The engine keeps it and `Children` in step; set it through the hierarchy API.
Explained in core-concepts/transforms.
| Field | Type | Default | Notes |
|---|---|---|---|
entity | Entity | none |
RuntimeOnly
Tag for a world-only derived entity (the layers a `Tilemap` projects, runtime tile colliders). Scene saves skip it, because persisting one would duplicate it against the next derivation.
Explained in core-concepts/components.
A tag — it carries no fields.
SceneOwner
Which additively-loaded scene owns the entity, and whether it survives that scene being unloaded.
Explained in world/scenes.
| Field | Type | Default | Notes |
|---|---|---|---|
scene | string | empty | |
persistent | boolean | false |
Transform
Position, rotation and scale — plus the read-only world-space values the engine composes down the parent chain.
Explained in core-concepts/transforms.
| Field | Type | Default | Notes |
|---|---|---|---|
position | Vec3 | (0, 0, 0) | Local position in world units, relative to the parent. Replicated. |
rotation | Quat | (0, 0, 0, 1) | Local rotation in degrees, applied X then Y then Z. 2D content turns about Z alone. Replicated. |
scale | Vec3 | (1, 1, 1) | Local scale per axis (1 = original size; negative flips). Replicated. |
worldPosition | Vec3 | (0, 0, 0) | Read-only — the engine computes it. |
worldRotation | Quat | (0, 0, 0, 1) | Read-only — the engine computes it. |
worldScale | Vec3 | (1, 1, 1) | Read-only — the engine computes it. |
Velocity
Constant linear and angular motion applied every frame, with no physics body involved.
Explained in scripting/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
linear | Vec3 | (0, 0, 0) | Replicated. |
angular | Vec3 | (0, 0, 0) | Replicated. |