How to use FStreamLevelAction function and load levels/maps asynchronously?
I'd like to use FStreamLevelAction and LatentManager to load levels/maps asynchronously. The levels can be loaded, but it seriously effect the FPS when streaming. I know maybe I the streamed level/map is too large, but the asynchronous loading should not effect main tick I think. Maybe I do something wrong, could anyone tell me how to load levels/maps asynchronously and smoothly without "stuck" the main tick?
P.S. Should I set bIsShouldBlockOnLoad to true or false?
asked Jul 10 '14 at 07:52 AM in C++ Programming
bIsShouldBlockOnLoad should be false. Otherwise main thread will be blocked till level is fully loaded.
Level streaming right now happens in the main thread and distributed across several frames. There are 2 main steps.
Streaming performance depends on how complex your actors are, you want AActor::RegisterAllComponnets function to do less work. For example big landscapes can have hundreds of components, so big landscape registration will certainly hitch. You should subdivide such landscapes to a smaller patches, the good number of components will be 64 in one patch.
Level streaming performance should be measured only in a cooked builds. In the cooked build all assets are stored in optimized formats, so engine don't have to do additional work on them during loading and actor registration.
answered Jul 10 '14 at 08:22 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here