# Unload all streaming levels

**URL:** <https://forums.unrealengine.com/t/unload-all-streaming-levels/479927>\
**Category:** World Creation\
**Tags:** loading-phase, unreal-engine, question\
**Created:** [March 8, 2021, 6:43pm UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927 "2021-03-08T18:43:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tj0mmas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tj0mmas](https://forums.unrealengine.com/u/Tj0mmas)\
**Post date:** [March 8, 2021, 6:43pm UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927/1 "2021-03-08T18:43:52Z")

</div>

Hello everyone,

I made an UI to select which streaming level I want to display.  
I am trying to unload ALL streaming levels before I load the one desired.

 ![331835-capture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/2/8b201ad44708cb67f6fd3df29c9870bb3de541f0.jpeg)

But it does not work properly :  
When I look at my level panels

![331836-capture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/5/a0535b6034c25fb8ee24f77f1d334f5b5aaaf21d.jpeg)

When I jump to one of the villas with my UI, some of the others are unloading (this is correct) but some others keep being loaded.  
Everything except the one I select from my UI should unload.  
When I plug a print in my loop, this is all correct, I see the 3 others streaming levels that should not be loaded, so my loop is good and the problem seems to come from the unload node… I tried to put a delay before the unload, but it does not change anything.

exemple of incorrect behaviour:  
1- I start from villaA, only A is displayed : ok  
2- I select B : A unloads, B loads : ok  
3- I select C : C loads but B does not unloads : not ok  
4- I select D : D loads and B and C keep loaded : not ok at all !!!

What should I do? This feature is really needed for performance issue and this is a professionnal project.  
Any help will be appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 8, 2021, 6:54pm UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927/2 "2021-03-08T18:54:52Z")

</div>

Get rid of the tick on ‘block on unload’. You can’t use ‘latency’ based node in a loop. The loop doesn’t wait for latency nodes.

---

<div class="post-metadata">

**Author:** ![Tj0mmas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tj0mmas](https://forums.unrealengine.com/u/Tj0mmas)\
**Post date:** [March 9, 2021, 2:25am UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927/3 "2021-03-09T02:25:25Z")

</div>

ok, so, it must be the reason why it does not unload everything. How should I do then?

---

<div class="post-metadata">

**Author:** ![Tj0mmas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tj0mmas](https://forums.unrealengine.com/u/Tj0mmas)\
**Post date:** [March 9, 2021, 2:26am UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927/4 "2021-03-09T02:26:20Z")

</div>

OK Thank you very much, you’ve unlocked me.  
I’ve changed my method to unload only the previous loaded stream level stored in a temporary variable as I only need 1 loaded at a time. Thx again!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 9, 2021, 8:31am UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927/5 "2021-03-09T08:31:00Z")

</div>

I think you can unload in a loop, just not with ‘block on unload’ checked…

---

<div class="post-metadata">

**Author:** ![Tj0mmas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tj0mmas](https://forums.unrealengine.com/u/Tj0mmas)\
**Post date:** [March 9, 2021, 5:08pm UTC](https://forums.unrealengine.com/t/unload-all-streaming-levels/479927/6 "2021-03-09T17:08:46Z")

</div>

Nope. obviously I tried, and unfortunately it didn’t work. But really, your first answer made me think it an other way and now it’s even more optimized. Thx
