Alternatively you could use object and actor iterators
GetAllActorsFromClass is made for blueprints but as you noticed it can be used in C++, that function it self use iterator.
Alternatively you could use object and actor iterators
GetAllActorsFromClass is made for blueprints but as you noticed it can be used in C++, that function it self use iterator.