Skip to content

GameplayEvent ​

Struct

Source: GameplayEvent.h

Description ​

Fixed-size POD carried by the GameplayEventBus.

One flat struct, no union, no variable-length payload. Field declaration order (pointer, then Scalar, then the two ids, then the tag) is chosen for alignment, not for readability — do not reorder without re-checking the byte budget in design.md (16 B on ESP32-C3, 24 B on native).

userData is an untyped escape hatch: the engine never interprets, manages, or frees it, mirroring the existing PhysicsActor::userData contract (include/core/PhysicsActor.h).

Properties ​

NameTypeDescription
userDatavoid*Untyped escape hatch (never owned by the engine).
valuemath::ScalarPosition / quantity / damage-style datum.
entityIdAuint16_t"Who" — the primary actor's entity id.
entityIdBuint16_t"With whom" (0 = none).
typeGameplayEventTypeEvent tag.

Released under the MIT License.