Sein UI Subsystem
Class · USeinUISubsystem : UWorldSubsystem
#include "Core/SeinUISubsystem.h"
World subsystem providing the UI toolkit’s ViewModel layer.
Responsibilities:
-
Creates and caches entity ViewModels (one per observed entity)
-
Creates and caches player ViewModels (one per player)
-
Owns the selection model (one per world)
-
Refreshes active ViewModels once after each engine frame’s sim pump
-
Cleans up ViewModels for dead entities
Functions
Section titled “Functions”UI
Get Entity View Model
Section titled “Get Entity View Model”Get or create an entity ViewModel for the given handle. Returns a cached instance if one already exists. Returns nullptr if the handle is invalid.
USeinEntityViewModel* GetEntityViewModel(FSeinEntityHandle Handle);Get Player View Model
Section titled “Get Player View Model”Get or create a player ViewModel for the given player ID. Returns a cached instance if one already exists.
USeinPlayerViewModel* GetPlayerViewModel(FSeinPlayerID PlayerID);Get Local Player View Model
Section titled “Get Local Player View Model”Convenience: get the local player’s ViewModel. Returns nullptr if there is no local player controller.
USeinPlayerViewModel* GetLocalPlayerViewModel();Get Selection Model
Section titled “Get Selection Model”Get the selection model (singleton per world). Tracks the local player’s selection and provides entity ViewModels.
USeinSelectionModel* GetSelectionModel() const;UI / Lobby
Get Or Create Lobby View Model
Section titled “Get Or Create Lobby View Model”Gets the lobby view model for this world, creating and binding it on first use. All widgets share it, so bind to its change event once.
USeinLobbyViewModel* GetOrCreateLobbyViewModel();UI / Minimap
Get Minimap View Model
Section titled “Get Minimap View Model”Gets the minimap view model, creating it on first use. Projects that never show a minimap never create it. It refreshes once per frame and supplies the blips, fog overlay and background.
USeinMinimapViewModel* GetMinimapViewModel();C++ members (1)
void ReleaseModuleOwnedStateForModuleUnload();Idempotently sever every external callback and owned view-model root before the UI module unloads.