UCGameManager
Overview
UCGameManager is a UGameInstanceSubsystem that acts as the central registry for game board definitions. It is accessed as a singleton via CGameInstance. When storeNewGameBoard is called from Blueprint, it converts all Blueprint structs into internal DataTable rows that each module’s spawner can consume.
Functions
| Name | Description |
|---|---|
| getInstance | Static helper that returns the UCGameManager subsystem from any actor |
| createFlyViewPlayer | Pure function that builds a FCBP_Player configured for a fly-view (top-down) pawn |
| create1StViewPlayer | Pure function that builds a FCBP_Player configured for a first-person character with skeletal, behavior, interaction and lifecycle |
| storeNewGameBoard | Main entry point: takes all game configuration structs and converts them into DataTable rows stored in a FCBP_GameStruct |
Internal Functions
| Name | Description |
|---|---|
| storeCharacter | Template that creates a FCCharacterDetailMaker row from any NPC room type and stores it in the game struct’s characterDetailMakerDT |
| staticCreateCharacter | Static template that maps common NPC fields (actor class, tags, scale, interaction) to a FCCharacterDetailMaker |
| mappingCompletionForPlayer | Static function for player-specific field mapping: fog of war settings (complex ray, refresh rate, revealed area, line of sight) |
| mappingCompletionForAIPawnAndChar | Static template for AI-specific field mapping: behavior tree, sight perception, automations |
| mappingCompletionForPawnAndChar | Static template for shared pawn/character field mapping: skeletal, movement, lifecycle, combat, skills |
| acpAssignNPCToRoom | Template that assigns NPCs to room detail structs with spawn probabilities and biome filtering |
storeNewGameBoard internals
The function processes each configuration section in order:
- Game — creates metadata DataTables (skill, resource, character, room) and stores widget class overrides with fallback to plugin defaults.
- World — maps
FCBP_WorldEffectorfields toFCWorldSpawnerDataStruct(cell size, LOD, pool, normals, etc.). - Player — iterates players, stores each as a character detail maker row. An implicit turn-by-turn fly pawn is always added.
- Fog — maps
FCBP_FogOfWartoFCFOWMakerStruct(render target, blur, intensity). - Map — maps
FCBP_MaptoFCMapMakerStruct(tile mesh, spline mesh, tangent). - Room & NPC — iterates room clusters and room descriptions, assigns NPCs (actors, pawns, characters) with spawn probabilities and biome filtering.
- Hexa — iterates
FCBP_TileAndGrassentries, maps tile effectors, room/corridor effectors, biome bounds and mesh probabilities. - Skill — registers skill lambdas or dynamic delegates, plus the preset
CToggleTemporarySelectskill. - Resource — registers inventory items.
- Quest — stores the quest definition delegate.