Main menu not working outside of editor

Hi, i’m working on a random dungeon generator and from the main menu you can set the Size of the dungeon. This value get saved in a custom GameInstance and the random generator in the game level read it to build a correct size dungeon.

This works perfectly in editor, i can play with the menu, select the size and go in to the dungeon. But when i Launch the game outside of the editor nothing works. The play button just reset the main menu and there is no level change.

Anyway in the editor my system works. What could i have done wrong? Some properties to adjust to deploy the exe? Something that works just in the editor?
Thanks (and sorry for bad english)

Hey Fry,

Did you maybe forgot to set default values in the constructors.
Maybe some Values which are important are zero, and because oof that nothing works.

Greetings

Hi , thanks for your answer but in the last hours the problem has slighty changed. After some clean and rebuild the menu is working and i manage to enter GameLevel. After some testing and debugging i realized that dungeons are always of the default size and the GameInstance i set in the menu does not hold the size value. This issue appears only outside of editor…

Here is my blueprint…

Fry

Here is the blueprint form the GameLevel… maybe some of these operation are not supported outside of the editor?

Hm sry but unfortunately I can’t see any mistakes made within your blueprints.
When the Game starts in Editor, it should also function in the packaged game.

I usually can’t package games because of reasons but when the packaging succedes the game should behave like in the editor.
Maybe you have to look through your packaging settings.

Ok that question is stupid, but just to get sure:
Did you package your game for windows?

Greetings

Yes, i am building for Win64 and i actually work on a win64 so that’s not the problem. Got an update anyway, the BPs are working fine the problem is the order of execution. Looks like in the packaged game, RandomMaze->BeginPlay runs before the end of GameLevelBP. This way the size of the dungeon has not been set yet!

Fry

OoK! Resolved. Long story short for anyone getting here in the future: my menu didn’t work until some clean/build/compile/cooking/packaging and remember that blueprints are not executed in order out of the editor. So i just create a function to generate my maze, and called it after my sizes was setted.

The weird thing is that you realize this very late, when you are in package time.

Fry