Changing GameMode when loading new sublevel
I am having issues having my game load a different gamemode when loading a new sublevel. I looked at as much documentations and tutorials as I could however I haven't been able to find an answer.
I have created a new gamemode the following way
All the cpp does is the following
After doing this I opened one of my sublevels that I load via a blueprint using load stream level
and set my gamemode level override to my newly created gamemode
However when i set a breakpoint in my gamemode, the constructor gets called as soon as the game starts, not when the gamemode is loaded and the Tick function never gets called.
I've tried looking as hard as I could and i am wondering: Did I setup something wrong? (probably) does GameMode override not work with sublevels and or streaming? Should I be doing this differently?
Thanks for the help! :)
asked Jun 18 '15 at 04:10 AM in C++ Programming
You have to use OpenLevel. Otherwise you are loading the level and merging with the existing level (you can't have 2 gamemodes).
More info about level streaming here https://wiki.unrealengine.com/Blueprint_Manual_Level_Streaming
If you would like to change game mode with LoadStreamLevel you have to do it manually.
P.S. You forgot Super::Tick(DeltaSeconds);
answered Jun 25 '15 at 03:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here