GS_Unit
GS_Unit is the complete character control system for GS_Play. It handles how entities are registered as controllable units, which controller possesses each unit, how raw player input is captured and converted into intent, and how that intent is translated into physical movement through a modular stack of movers, grounders, and influence fields.
For architecture details, component properties, and extending the system in C++, see the GS_Unit API.
Quick Navigation
| I want to… | Feature | API |
|---|---|---|
| Register units, track active controllers, or spawn units at runtime | Unit Manager | API |
| Possess and release units with player or AI controllers | Controllers | API |
| Capture raw input and convert it into structured movement intent | Input Data | API |
| Move characters with movers, grounders, and movement influence fields | Movement | API |
Installation
GS_Unit requires GS_Core. Add both gems to your project before using any Unit components.
For a full guided walkthrough, follow the Simple Project Setup guide.
Quick Installation Summary
- Enable the GS_Unit gem in your project configuration.
- Create a Unit Manager prefab and add it to the Game Manager’s Managers list.
- Configure physics collision layers for character movement.
- Place a Player Controller and Unit entity in your level.
Unit Manager
The Unit Manager is the singleton coordinator for everything unit-related. It handles registration of new units as they spawn, maintains an indexed list of all active units queryable by name or ID, and provides the spawn interface for runtime unit creation. It also participates in the standby system for clean level transitions.
Controllers
Controllers are the possession layer — they determine which entity a given intelligence (player or AI) currently owns and drives. Player and AI controllers share the same possession interface, so swapping control mid-game or having both active simultaneously requires no special-casing.
Input Data
The Input Data feature set converts hardware signals into structured intent your movement code can consume. The PlayerControllerInputReader reads raw input events, InputData components store the current state, and Input Reactors compute movement vectors from keyboard or joystick input with deadzones and scaling.
Units
Unit overview description, leads to movement.
See Also
For the full API, component properties, and C++ extension guide:
For step-by-step project setup:
Get GS_Unit
GS_Unit — Explore this gem on the product page and add it to your project.