FUIControllerBridge
Lets a .ui screen name any reflected C++ class as its controller. A host (the packaged game, play-in-editor) installs the hooks once per screen stack with a way to reach that stack's live actor world:
- Module
- Game
- Header
#include "Game/UIControllerBridge.h"- Namespace
Mowo
FUIControllerBridge::Install(&m_uiStack, this -> MWorld* { ... });
The screen stack then resolves the root's controller class to the first live actor (or actor component) of that class in the world, calls its zero-argument MFUNCTIONs by action name (OnPlayPressed, Controller:Quit) and reads controller.<Name> bindings from its MPROPERTY fields or zero-argument getter MFUNCTIONs. OnScreenShown / OnScreenHidden are called when the screen mounts and unmounts. A Visual Scripting class is not handled here: the stack runs those itself.
The instance is looked up again whenever the cached one is destroyed or the world changes, so a play session ending or a hot reload never leaves a stale pointer behind.
Type aliases
| Alias | Description |
|---|---|
using FWorldProvider = std::function<MWorld*()> |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Install | Installs the process-wide hooks (idempotent) and registers host (a CMiriGraphicsScreenStack address) with its world. |
void | Reset | Forget a host's world and cached controllers: its session is over. |
Function details
Install
static void Install(const void* host, FWorldProvider world)Installs the process-wide hooks (idempotent) and registers host (a CMiriGraphicsScreenStack address) with its world. Calling it again replaces the provider and drops that host's cached controllers.
Reset
static void Reset(const void* host)Forget a host's world and cached controllers: its session is over.