玩法组件
下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 Details 面板读的那一份——
所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲怎么用的正文在
每条目所链接的指南里。字段说明取自 C++ ES_PROPERTY 处的原文,因此为英文。
AudioListener
The ear spatial audio is mixed relative to — usually the camera or the player.
Explained in assets/audio.
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true |
AudioSource
Declarative playback attached to an entity, attenuated by distance when spatial.
Explained in assets/audio.
| Field | Type | Default | Notes |
|---|---|---|---|
clip | Asset<audio> | none | |
bus | string | "sfx" | |
volume | number | 1 | |
pitch | number | 1 | |
loop | boolean | false | |
playing | boolean | false | Raise to play, lower to stop. The engine lowers it when a non-looping clip ends. |
finished | boolean | false | Clip completed (runtime, read-only). Raise Playing to play it again. |
playOnAwake | boolean | false | |
spatial | boolean | false | |
minDistance | number | 100 | |
maxDistance | number | 1000 | |
attenuationModel | number | 1 | |
rolloff | number | 1 | |
priority | number | 0 | |
enabled | boolean | true |
BehaviorTreeAgent
Ticks a behavior tree asset against a blackboard, calling registry actions at its leaves.
Explained in gameplay/ai/behavior-trees.
| Field | Type | Default | Notes |
|---|---|---|---|
bt | Asset<behaviortree> | none | |
status | string | empty | Last root status (runtime, read-only). |
EventBinding
Wires an event on this entity to named actions — gameplay authored in the inspector, with no script.
Explained in scripting/events.
| Field | Type | Default | Notes |
|---|---|---|---|
rows | array | empty |
NavAgent
Steers an entity along a path found on the navigation grid.
Explained in gameplay/ai/navigation.
| Field | Type | Default | Notes |
|---|---|---|---|
speed | number | 120 | Range ≥ 0. |
radius | number | 0 | Range ≥ 0. |
arriveRadius | number | 6 | Range ≥ 0. |
repathInterval | number | 0.5 | Replan cadence while moving; 0 = only when the target changes. Range ≥ 0. |
hasTarget | boolean | false | |
targetX | number | 0 | |
targetY | number | 0 | |
targetZ | number | 0 | |
arrived | boolean | false |
NavArea
A box of ground that costs more or less to cross — mud, water, a road.
Explained in gameplay/ai/navigation.
| Field | Type | Default | Notes |
|---|---|---|---|
halfExtents | Vec3 | (200, 100, 200) | |
cost | number | 3 | What crossing it costs against 1 for open ground. Range ≥ 0. |
enabled | boolean | true |
NavLink
A way between two places the ground does not join — a drop, a ladder, a plank.
Explained in gameplay/ai/navigation.
| Field | Type | Default | Notes |
|---|---|---|---|
start | Vec3 | (0, 0, 0) | |
end | Vec3 | (0, 0, 150) | |
bidirectional | boolean | true | Whether it can be taken both ways — a drop off a ledge cannot. |
radius | number | 50 | How far from each end ground may be and still be joined. Range ≥ 1. |
enabled | boolean | true |
NavObstacle
A box that blocks without being geometry — a door, a gate, a placed building.
Explained in gameplay/ai/navigation.
| Field | Type | Default | Notes |
|---|---|---|---|
halfExtents | Vec3 | (50, 100, 50) | |
enabled | boolean | true | Whether it blocks right now — a door that opens. |
NavVolume
The box a navigation mesh is baked over, out of the scene’s own collision geometry.
Explained in gameplay/ai/navigation.
| Field | Type | Default | Notes |
|---|---|---|---|
halfExtents | Vec3 | (1000, 500, 1000) | |
cellSize | number | 50 | Range ≥ 1. |
cellHeight | number | 10 | Vertical voxel size; what separates one level from the one above it. Range ≥ 1. |
maxSlopeDegrees | number | 45 | Range 0–89. |
agentHeight | number | 180 | Headroom an agent needs to walk somewhere. Range ≥ 0. |
agentRadius | number | 30 | How wide the agent is; the mesh is pulled back from walls by this. Range ≥ 0. |
stepHeight | number | 40 | Range ≥ 0. |
layers | number | 0 | Layer mask the ground is taken from; 0 = every layer. Range ≥ 0. |
NetGhost
Tag: this entity is a client-side proxy of one the server owns.
Explained in scripting/networking.
A tag — it carries no fields.
Perceiver
Senses nearby perception targets within a sight cone and range.
Explained in gameplay/ai/perception.
| Field | Type | Default | Notes |
|---|---|---|---|
range | number | 220 | Range ≥ 0. |
fovDegrees | number | 360 | Range 0–360. |
facingAxis | string | "x" | 'x' is screen-right (a flat scene); '-z' is where an imported model faces. |
losLayers | number | 0 | 3D layer mask the sight ray may hit; 0 = every layer. Range ≥ 0. |
Perceptiontransient
What a perceiver currently sees — written each frame for the entity's own logic to read.
Explained in gameplay/ai/perception.
| Field | Type | Default | Notes |
|---|---|---|---|
visible | boolean | false | A target is seen (runtime, read-only). |
distance | number | 0 | |
targetX | number | 0 | |
targetY | number | 0 | |
targetZ | number | 0 | |
dirX | number | 0 | |
dirY | number | 0 | |
dirZ | number | 0 |
PerceptionTarget
Tag: perceivers can see this entity.
Explained in gameplay/ai/perception.
A tag — it carries no fields.
Replicated
Marks an entity the server replicates to every client.
Explained in scripting/networking.
| Field | Type | Default | Notes |
|---|---|---|---|
netId | number | 0 | |
owner | number | 0 | |
archetype | string | empty |
ScriptGraphAgent
Runs a script graph asset on this entity — events, an exec wire, and data wires between registered names.
No guide section covers this one yet.
| Field | Type | Default | Notes |
|---|---|---|---|
graph | Asset<scriptgraph> | none |
StateMachineAgent
Runs a gameplay state machine asset, calling registry actions as states enter, update and exit.
Explained in gameplay/ai/state-machines.
| Field | Type | Default | Notes |
|---|---|---|---|
fsm | Asset<statemachine> | none | |
current | string | empty | Active state (runtime, read-only). |