跳转到内容

核心组件

下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 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.

FieldTypeDefaultNotes
entitiesEntity

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.

FieldTypeDefaultNotes
valuestringempty

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.

FieldTypeDefaultNotes
entityEntitynone

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.

FieldTypeDefaultNotes
scenestringempty
persistentbooleanfalse

Transform

Position, rotation and scale — plus the read-only world-space values the engine composes down the parent chain.

Explained in core-concepts/transforms.

FieldTypeDefaultNotes
positionVec3(0, 0, 0)Local position in world units, relative to the parent. Replicated.
rotationQuat(0, 0, 0, 1)Local rotation in degrees, applied X then Y then Z. 2D content turns about Z alone. Replicated.
scaleVec3(1, 1, 1)Local scale per axis (1 = original size; negative flips). Replicated.
worldPositionVec3(0, 0, 0) Read-only — the engine computes it.
worldRotationQuat(0, 0, 0, 1) Read-only — the engine computes it.
worldScaleVec3(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.

FieldTypeDefaultNotes
linearVec3(0, 0, 0) Replicated.
angularVec3(0, 0, 0) Replicated.