Skip to content

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

UI

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 or create a player ViewModel for the given player ID. Returns a cached instance if one already exists.

USeinPlayerViewModel* GetPlayerViewModel(FSeinPlayerID PlayerID);

Convenience: get the local player’s ViewModel. Returns nullptr if there is no local player controller.

USeinPlayerViewModel* GetLocalPlayerViewModel();

Get the selection model (singleton per world). Tracks the local player’s selection and provides entity ViewModels.

USeinSelectionModel* GetSelectionModel() const;

UI / Lobby

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

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.