# Whats the difference - Get all actors of class versus each actor registers itself

**URL:** <https://forums.unrealengine.com/t/whats-the-difference-get-all-actors-of-class-versus-each-actor-registers-itself/637204>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 30, 2022, 2:06pm UTC](https://forums.unrealengine.com/t/whats-the-difference-get-all-actors-of-class-versus-each-actor-registers-itself/637204 "2022-08-30T14:06:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [August 30, 2022, 2:27pm UTC](https://forums.unrealengine.com/t/whats-the-difference-get-all-actors-of-class-versus-each-actor-registers-itself/637204/4 "2022-08-30T14:27:45Z")

</div>

> [@Alternative to "Get all actors from Class"?](https://forums.unrealengine.com/t/alternative-to-get-all-actors-from-class/453955/2):
>
> It IS intensive. To get round this, you need to store an array of the spawned blueprints (usually in the level BP, or the player BP, depending on what the listed BPs are), and then loop through it. You need to keep track of when to add to, or remove from, this list, but the overhead is massively less than GetActorsFromClass. The overhead of GetActorsFromClass comes from it looping through ALL the actors in the game, and returning an array where the class matched. If you create the array and mai…

this info here seems to suggest that if I register my actors at construction time (or maybe at some point during runtime if they are spawned then), that is beneficial.

But in order to find the manager I have to use get actors of class. _Unless_ the getting of the game mode/controller/other unreal default framework classes is fundamentally different than finding an actor in the level. If it is, then it seems the best solution is to register an array of actors with something like the game mode at construction time (this is how I’d store reference to actors placed at design time)

---

_[View the full topic](https://forums.unrealengine.com/t/whats-the-difference-get-all-actors-of-class-versus-each-actor-registers-itself/637204)._
