Level Streaming: Loading levels in for loop only loading first level
Hi there! I am currently trying to load in levels from an array of FNames, that I use as parameters in the LoadLevel function. I want these levels to load in when the player also loads in. The problem I am having is that no matter how big the array is, it only loads the first level in that array (I have tried switching entries in the array to make sure that I am not simply using the wrong naming conventions for the other levels etc.). Is there any particular reason why this would not be possible? Thank you in advance!
I assume this is yet another bug for CPP programmers. I have, however, come up with a fix, using the LatenInfo parameter. In the class that is trying to load in the level, store the following members:
In the constructor, assign the latent action info like so:
Load level should look something like this:
Calling LoadLevel() once should load all the levels consecutively - hope this saves someone the hassle that I had to go through.
Follow this question
Once you sign in you will be able to subscribe for any updates here