Packaged Game Not working as expected

So In the editor If I play standalone, the game works exactly as intended. So basically, I have a MainMenu Level where in the level blueprint I call a function on the Game Instance to “Show Main Menu” which adds a widget to the viewport. After I package the game and load the game the menu doesn’t load and I spawn in with a “Default Pawn” and fly around the empty level. Why is this happening?

Id call said widget in a main menu game mode instead

I currently have that as the setup right now and its still not working. I’m not sure what’s going on but my game insists on spawning me as a “Default Pawn” and not adding my widget to the viewport.

Game instance or game mode? There’s a difference. In your main menu level, is the game mode override set set to this game mode. And is the default pawn in that game mode set to your character? In my project I have a special character that’s just a camera for my main menu level and game mode

Yea, I understand the differences of Game Instances and Game Modes. I have a pretty good understanding of Blueprints and programming in Unreal which is why I’m completely baffled as to why this is acting the way that it is. I have tried to put the “Show Main Menu” function in my “Main Menu Character”, in my Level Blueprint, in my Game Mode, in my Game instance and I even tried making a Blueprint Function Library and calling it through that. Every difference setup works perfectly fine launching in “Standalone” through the editor. But Once I package the game and launch it, it just spawns a default pawn and even shows my “HUD” widget, which isn’t even being called. I even completely disabled the HUD widget, it still some how spawns it. The HUD widget is only being called in my game Instance blueprint. So I have no idea what is going on. It might be a bug, but I have about 4 months of work invested into this project and I really don’t feel like migrating and fixing broken references in a new project because of some bug that shouldn’t be there. So I’m hoping its something I can just fix.

Are you by chance using level streaming?

Can you upload some screens of your instance/games mode for main menu?

This is my character “Begin Play” code (calling the “Show Main Menu” event)

This is my Game Instance where the “Show Main Menu” event creates and displays the widget

This is my Main Menu Level Game Mode Override Settings

This is showing that I am using the “Play-in-Editor: Standalone”

This is the expected result (in my PIE Standalone)

This is the not-so-expected result from my packaged game.

Honestly, this is really infuriating. Months of debugging and testing and never an issue as stubborn as this one. An issue that shouldn’t even exist. All documentation online points to this being the proper setup for what I am trying to achieve and yet I have this extremely persistent problem that, no matter what I do. Will not go away.

Are you by chance using level streaming?

I am not. Its just a blank default level (non-level streaming)

So id recommend just calling the the show game menu from the game mode BP, instead of casting game instance through the player, also maybe try a print node off of cast failed if you haven’t already to ensure the cast is working

Yeah I’ve tried this. I set the entire event “Show Main Menu” up in the Game Mode and it still doesn’t work. I’ve tried print strings and I’ve tried setting up a text inside my HUD (that for some reasons keeps getting displayed) to see whats calling it and nothing gets printed. Its like my game has a mind of its own and does whatever it wants.

So I think I figured it out. I had a character spawned in my world as an “example” character for character customization. I had it set so that the character would not be possessed. However, Without changing any settings or code. I deleted the character and then re-packaged my game and tested it. Now my Main Menu Widget appears. (Mind you, I was not possessing the character in the world, the game was creating a “Default” pawn, with no body or anything)