CommonGame Plugin

You need to create a subsclass in C++ deriving from GameUIManagerSubsystem.

You also need to create a GameUIPolicy-derived blueprint, in which you will list which PrimaryGameLayout to use.

Then, in your DefaultGame.ini (config file), you need to create a reference to that UI policy blueprint, for the property
UPROPERTY(config, EditAnywhere)
TSoftClassPtr<UGameUIPolicy> DefaultUIPolicyClass;
found in UGameUIManagerSubsystem.

Like this, (from lyra’s DefaultGame.ini):

[/Script/LyraGame.LyraUIManagerSubsystem]
DefaultUIPolicyClass=/Game/UI/B_LyraUIPolicy.B_LyraUIPolicy_C

so usually it will vary depending on your package name.

[/Script/PACKAGE_NAME.UI_MANAGER_SUBSYSTEM_NAME]
DefaultUIPolicyClass=/Game/UI_POLICY_BP_PATH.UI_POLICY_BP_NAME_C

Also make sure all you’re using the classes from CommonGame (GameInstance, LocalPlayer, PC) or nothing will work :sunny:

You can check this website for more info: https://zhuanlan.zhihu.com/p/598803136