There are two main ways to get all actors of class. The first one is with UGameplayStatics, which is how you do it in Blueprint. The second one is with TActorIterator, which gives you way more flexibility. And, as bonus, TObjectIterator also allows you to get all the objects and not only the actors.
Project Download: https://www.patreon.com/posts/unreal-...
────────────────────────────────────────────────────
Playlist ► • How To? - Unreal Engine 5 C++
Poll C++ ► https://forms.gle/Hh64WpUK6kcgX6SC8
────────────────────────────────────────────────────
French Channel ► https://www.youtube.com/AlexQuevillon...
English Channel ► https://www.youtube.com/AlexQuevillon...
────────────────────────────────────────────────────
Discord ► / discord
Patreon (Project Files) ► / alexquevillon
YouTube Members ► / @alexquevillonen
────────────────────────────────────────────────────
Unreal Engine Version ► 5.2
────────────────────────────────────────────────────
0:00 Intro
0:10 Declare functions
3:43 Includes
4:35 Get the names of all actors
10:48 Get the names of all static meshes
14:39 Get the names of all objects
16:58 Test
21:31 Patreon Wall!
#UnrealEngine #UE5 #UE5Tutorial #UE4 #UE4Tutorial
UE5 C++ 42 - How To Get All Actors And Objects Of Class With C++? - Unreal Engine Tutorial Editor CPP