All Actors of Class


#1

I see from another post that it is preferable (and easier) to use Class.instances. That said, I tried doing it the Blueprint way like this:

GameLib.all_actors_of_class(@@world, Actor, actorList)

because I want a list of all Actors in the level. When I specify the class to look for in the second argument (Actor) the editor shows an error that the supplied actor_class was expected to be of type ‘EntityClass’. Any idea what I’m doing wrong? Thanks.


#2

Try using Actor.static_class instead. Actor is an Entity so static_class gets you the EntityClass of any Entity.