Units
Categories:
A “unit” in GS_Play is any entity that can be possessed by a controller and driven through gameplay. The GS_UnitComponent is the marker that transforms an ordinary entity into a unit. It provides the possession interface, unique naming, standby awareness, and registration with the Unit Manager.
Units are the characters, vehicles, creatures, or any other controllable actors in your game. They do not contain decision-making logic themselves — that comes from the controller that possesses them. A unit provides the body: movement, collision, visuals, and stats. The controller provides the brain: player input or AI logic.
For usage guides and setup examples, see The Basics: GS_Unit.

Contents
How It Works
Registration
When a GS_UnitComponent activates, it registers itself with the Unit Manager. This allows the manager to track all active units and respond to CheckIsUnit queries. When the component deactivates, it unregisters.
Possession
Units are possessed by controllers through the UnitRequestBus:
- A controller calls
Possess(controllerEntityId)on the unit. - The unit stores the controller reference and broadcasts
UnitPossessedonUnitNotificationBus. - The controller can now issue commands to the unit’s subsystems (movement, actions, etc.).
- Calling
DePossess()clears the controller reference.
Standby
Units receive standby signals from the Unit Manager. When entering standby, the unit broadcasts UnitEnteringStandby on its notification bus. Child components (movers, input reactors, etc.) listen for this and pause their processing. UnitExitingStandby reverses the process.
GS_UnitComponent Reference
Request Bus: UnitRequestBus
Commands sent to a specific unit. ById bus — addressed by the unit’s entity ID, multiple handlers.
| Method | Parameters | Returns | Description |
|---|---|---|---|
Possess | AZ::EntityId possessingController | void | Assigns a controller to this unit. |
DePossess | — | void | Removes the current controller from this unit. |
GetController | — | AZ::EntityId | Returns the entity ID of the currently possessing controller. |
GetUniqueName | — | AZStd::string | Returns the unique name assigned to this unit. |
Notification Bus: UnitNotificationBus
Events broadcast by a unit. ById bus — addressed by the unit’s entity ID.
| Event | Parameters | Description |
|---|---|---|
UnitPossessed | AZ::EntityId controller | Fired when a controller possesses this unit. |
UnitEnteringStandby | — | Fired when this unit enters standby. |
UnitExitingStandby | — | Fired when this unit exits standby. |
Virtual Methods
| Method | Parameters | Returns | Description |
|---|---|---|---|
SetUniqueName() | — | void | Called during initialization to generate the unit’s unique name. Override in subclasses to use project-specific naming. |
Setup
Unit Entity Configuration
A minimal unit entity requires:
- GS_UnitComponent – Registers the entity as a unit and provides the possession interface.
- Movement components – At least a mover and optionally a grounder for ground detection.
- PhysX collider – For physics interaction and ground detection.
A fully featured unit entity typically includes:
GS_UnitComponentGS_MoverContextComponent– Aggregates movement input from movers- A mover component (e.g.,
GS_3DFreeMoverComponent,GS_3DSlideMoverComponent, orGS_PhysicsMoverComponent) - A grounder component (e.g.,
GS_PhysicsRayGrounderComponent) for surface detection - PhysX Rigid Body and Collider components
- Mesh or Actor component for visuals
Unit Collider Configuration

Collision layers used for a unit collider, as seen in the Entity Inspector.
Units require properly configured PhysX collision layers to interact with the environment and other units. If you have not set up your PhysX Collision Layers or Groups yet, refer to the Setting Up Your Project Environment guide.
Typical collision layer assignments:
- Unit layer – The unit’s own collider. Collides with environment and other units.
- Ground detection layer – Used by grounder raycasts. Collides with terrain and walkable surfaces only.
See Also
For component references:
- Unit Manager – Spawning and lifecycle management
- Unit Controllers – Controllers that possess and drive units
- Movement – Movement, grounding, and influence components
- Input Data – Input state and reaction components
Get GS_Unit
GS_Unit — Explore this gem on the product page and add it to your project.