# Is it possible to "Get All Actors of Class" from code

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-get-all-actors-of-class-from-code/308170>\
**Category:** C++\
**Tags:** get-all-actors-from-, unreal-engine, UE4, CPP, question\
**Created:** [February 26, 2015, 3:27am UTC](https://forums.unrealengine.com/t/is-it-possible-to-get-all-actors-of-class-from-code/308170 "2015-02-26T03:27:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e82d003a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e82d003a](https://forums.unrealengine.com/u/anonymous_user_e82d003a)\
**Post date:** [February 26, 2015, 3:27am UTC](https://forums.unrealengine.com/t/is-it-possible-to-get-all-actors-of-class-from-code/308170/1 "2015-02-26T03:27:41Z")

</div>

I’m pretty new to Unreal Engine and i’m trying to find a way to call this method from a c++ class, and not from blueprint (i’m not going to use them for this project), as explained here:  
[https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html](https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html)  
Is it possible?

**Update** :  
I have found this:  
GetWorld()-\>PersistentLevel-\>Actors;  
i guess it’s the only way to do it. looks nice.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_957a4452](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_957a4452](https://forums.unrealengine.com/u/anonymous_user_957a4452)\
**Post date:** [February 26, 2015, 1:16pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-get-all-actors-of-class-from-code/308170/2 "2015-02-26T13:16:15Z")

</div>

Hi ,

Look at this page

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

Hope it helps!
