Download

Completely delete level instances

Hi,

I’m using level streaming and Get Streaming Level>Create Instance nodes to generate level tiles in my game. I also want the ability to destroy the streamed level instances but the node Should be Loaded only seems to hide the instances. Because in-game I need to refire the level streaming function. It works to hide the unused level instances and make new ones, but it seems my fps drops permanently with each refire.

I saw an answer to this being the following:

In c++ you can use bIsRequestingUnloadAndRemoval flag in ULevelStreaming. Set it to ‘true’ and engine will remove that level streaming object once sub-level is unloaded.

I’m wondering how to access this in c++ or expose it to blueprint somehow.

A better question first might: is loading, unloading, loading new levels, unloading, loading new levels, unloading etc. the culprit of the fps dropping?

Thanks, Jack

I would also like to know this. I’d like to be able to generate and destroy levels generated on a grid as the player moves through the world, however the framerate drops permanently each time I create a new instance even if I unload it or hide its visibility.

destroy does not Unload the level.
I think you are just using the wrong keyword.
follow this guide and/or the content examples…
https://docs.unrealengine.com/en-US/…nts/index.html

Also, unload works fine for me.