Download

Change classes after level streaming

Hey so after I load + unload my old level using level streaming, I want to delete the current game state, and spawn in a new one, and set that as the default game state in the GameStateClass in the game mode.

So I delete the old game state before I load the new level, then spawn in a new one after, but all of my pointers (eg. player, player controller, other characters, etc) thats in the spawned new game state are null as I think its before the players and the other classes been initialised or recognised or something like that.

So then I decided to call a NewGameState->NewBeginPlay() that contains the begin play calls in another function that is called by the game mode a tick after spawning the game state in, but that also doesn’t work.

I’ve been at this for days now, please can someone help me figure this out please ! :frowning: