I am having an issue with Unreal Engine 5.2 initially loading “Temp/Untitled_0” as the level before loading the actual default level that I have set in project settings. I have the editor startup map, the game default map, and server default map set correctly to “MainMenu3D” but when I package my game for windows I have logging that shows that it starts with the Untitled_0 map and then deconstructs my UIManager class which had references that are lost from that point on. I also have the map added to the list of maps for packaging.
The UIManager is initialized in my GameInstance class (GameManagingInstance).
Warning: GameManagingInstance initialized Warning: UIManager initialized with session parent menu: BP_SessionParent_C in object ID: 22451 Display: Audio Device (ID: 1) registered with world 'Untitled'. Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden Display: Game Engine Initialized. Display: Starting Game. Browse: /Game/Levels/MainMenu3D?Name=Player LoadMap: /Game/Levels/MainMenu3D?Name=Player BeginTearingDown for /Temp/Untitled_0 UWorld::CleanupWorld for Untitled, bSessionEnded=true, bCleanupResources=true InvalidateAllWidgets triggered. All widgets were invalidated
I also deleted the Binaries, DerivedDataCache, Intermediate, and Saved folders in the project, rebuilt, recooked, and repackaged multiple times with no change. I have even tried reloading and revalidating the selected default map. I then created a completely different project and packaged it and notice that it does the same thing. So…does UE5 just expect packaged games to have to wait for an empty level load and teardown before initializing objects??