Level Blueprint and GameMode aren't working after a level change
I have a blank level i'm using as a placeholder menu level. In it i have a button event in the level blueprint to call ServerTravel(TestMap?Listen) from my custom GameMode TestGameMode_Menu in c++. The new level (TestMap) uses another GameMode called TestGameMode (when i switch levels in the editor the world setting gamemode are showing the correct ones) in which I have a begin play event that prints to the screen "new level loaded" in the level blueprint.
Everything works fine when I PIE, but when I click launch and run the game everything works for the blank level but when the new level loads the level blueprint isn't calling the begin play event.
I also have debug to screen calls in the PostLogin and BeginPlay functions in the TestGameMode which aren't getting called and debug calls in the TestGameMode_Menu are getting called again, but get called correctly when I PIE but not when i play through launch.
Any help would be appreciated.
Ok so after further digging around I found the play game standalone which is what i needed and there the level loading and game mode works as intended. I also packaged the game and everything is working correctly So its only Launch which from what i read is meant to be used for mobile devices so i was using it wrong.
answered Sep 11 '14 at 01:04 AM
Level blueprint will run with level, so if you change level it will run a blueprint of new level, and for the gamemode it will persist when it run whatever level you change unless you change the gamemode.
answered Aug 08 '14 at 05:42 AM
I have found PIE/launch doesn't consistently handle servertravel very well, and often behaves differently than a built exe or packaged game, so I would test all of your inter-level functionality that way.
Possibly unrelated, since you seem to have resolved your issue, I've also found that at least when using seamless travel, you can't guarantee that the level blueprint's Begin Play will get hit after the GameMode or PlayerControllers are initialized, so any functionality you have that's dependent on those won't work. See my question here.
answered Sep 24 '14 at 12:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here