I have the main menu in my game that works fine in the editor however after I’ve built the game it doesn’t appear even though I’ve set the camera that the player is supposed to possess upon opening the games .exe file. I have the main menu become attached upon the BeginPlay event which works in the editor but not within the build which possesses the pawn that only has a camera on it but doesn’t create the main menu widget.
For the packaging settings, its set to shipping and I have it doing a Full Rebuild when packaging but I am unsure that is the reason as its only today I have encountered this issue
Edit: Could it possibly be that the player doesnt possess the player pawn until the after the levels Begin Play has executed?
How are you creating your menus? Is the correct level set in the project settings(DefaultGameMap)? What camera are you possessing? Is there a specific reason / art of gameplay involved? E.g. for creating a MainMenu you could create an empty level and create the widget in the level blueprint.
My pawn within the MainMenu simply gets AutoPossesed by the player, the Pawn itself is attached to a level sequencer that simply makes it spin. I have several Pawns that the player switches in between in the different areas of this map. All of which has different widgets but those work fine when the main menu widget is functioning, which it currently is not even being added in the build for whatever reason but the player is able to get AutoPossesed.
This is how it works, on begin play it gets the values from the GameInstance (Brobdingnagian) which basically are just branch checks whether the player won, lost, or went out of bounds and then goes to each pawns camera accordingly that are placed around the MainMenuLevel. If none of these is true then it will simply go to the MainMenuCamera (which gets auto possessed) and then simply displays that MainMenu widget.
The big problem when packaging the project is that the player auto possesses the correct pawn and can see through the camera, however, the level blueprints BeginPlay either doesn’t fire or is out of order with the entire game. I have also attempted doing the same with the Possessed event and the Begin Play in the MainMenuPawn blueprint.
So, you could try to use just the standard pawn (no selfmade) and just place camera actors and use those with SetViewTargetWithBlend (I think). Next you could check if your widgets are referenced (right click in content browser). You could check if all necessary files are included when packaging (project settings - packaging - ListOfMapsToInclude).
in editor standalone mode it creates the window and the widget but i cant actually get it into focus, i can control it and everything but its just pushed all the way back and basically only exists when you can look at the windows when alt+tabbing
Does it work when you disconnect all connections and just create the MainMenuWidget?
Did you try a blank project with just a menu and package this?
Did you look at the outputlog?
And could you tell us the sequence of events you want to happen, what the player should be able to, etc.
Now, after CreateWidget, do one of your SetViewTargetWithBlend. If this works, do all of this after the CastToGameInstance. After that, one branch, do check if you can get a variable from your GameInstance. If this works, try to add your sound. And so on