then, ideally before the UI is needed, load the UI class:
auto UIClassPtr =TSoftClassPtr<UEmergenceUI>(FSoftObjectPath(TEXT("WidgetBlueprintGeneratedClass'/Emergence/EmergenceUI_BP.EmergenceUI_BP_C")));TSubclassOf<UEmergenceUI> Class =UIClassPtr.LoadSynchronous();
Then, when the UI is needed, open it with the following: