# Iterating through world outliner folder in c++

**URL:** <https://forums.unrealengine.com/t/iterating-through-world-outliner-folder-in-c/369518>\
**Category:** C++\
**Tags:** outliner, unreal-engine, editor, question, CPP\
**Created:** [September 6, 2016, 6:19am UTC](https://forums.unrealengine.com/t/iterating-through-world-outliner-folder-in-c/369518 "2016-09-06T06:19:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piilorasva](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Piilorasva](https://forums.unrealengine.com/u/Piilorasva)\
**Post date:** [September 6, 2016, 6:19am UTC](https://forums.unrealengine.com/t/iterating-through-world-outliner-folder-in-c/369518/1 "2016-09-06T06:19:16Z")

</div>

Hello, I would like to know if it is possible to have a folder inside world outliner as a variable/array in c++ and if it is possible to iterate through it? I would like to be able to set everything inside a specific folder hidden in game and see if that helps performance any significant amount.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4b3639a6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4b3639a6](https://forums.unrealengine.com/u/anonymous_user_4b3639a6)\
**Post date:** [September 6, 2016, 9:10am UTC](https://forums.unrealengine.com/t/iterating-through-world-outliner-folder-in-c/369518/2 "2016-09-06T09:10:46Z")

</div>

Hey Piilorasva

through this code you should be able to iterate through all actors which are currently in the Outliner.

```
TActorIterator< AActor > ActorItr = TActorIterator< AActor >(GetWorld());
while (ActorItr)
{
    //... do stuff
    ++ActorItr;
}

```

Greetings

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b4bf635](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b4bf635](https://forums.unrealengine.com/u/anonymous_user_3b4bf635)\
**Post date:** [August 19, 2018, 5:36pm UTC](https://forums.unrealengine.com/t/iterating-through-world-outliner-folder-in-c/369518/3 "2018-08-19T17:36:09Z")

</div>

Is it possible to do the same in Blueprint?

---

<div class="post-metadata">

**Author:** ![RaigNeier](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RaigNeier](https://forums.unrealengine.com/u/RaigNeier)\
**Post date:** [June 23, 2021, 8:25pm UTC](https://forums.unrealengine.com/t/iterating-through-world-outliner-folder-in-c/369518/4 "2021-06-23T20:25:09Z")

</div>

![342226-editorutilitywidgetfolderpath.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/6/5e6bf71327a7cc7cf1ee0ec5030d9753e830693b.png)

Yes, through Editor Utility or Editor Utility Widget (Not in Runtime)
