number of gamestate in a game

hi

seems my construction script of my gamestatebase is run multiple times
i was under the impression a game only has 1 gamestate o gamestatebase. am i wrong

alternatively i am putting my gamestate construct script in an infinite loop
i am using levels. maybe i am re initializing the gamestate each time i change the level

thanks

It is UE editor fault. Also make sure you clear log every time before you start game in editor.

And regularly package, deploy and test your game. Lots of things run differently in editor and packaged games.

1 Like

seems to happen when i open another map

so i now test for and open the main map at start, and thereafter use streaming levels

each time i open a map the gamestate restarts too along with other blueprints

Game Instace is most base object that survives level loading. It starts before anything else, and survives level load.

However because it starts first, you cannot reference almost anything outside of it (as nothing is loaded yet). But it is perfect for storing variables trough level load.

1 Like

thanks i am with you

how do you get the game instance or where is its blueprint located
where do you set it
can you set it in the game mode or not

think i found it thanks