Is there an easy way of getting an array of all objects of a particular class that either currently exist or currently exist within a level without having to manually create object arrays and have each object add themselves to those lists in their Blueprints?
Hi, you may want to try using a “Get all actors of class” node, then do a For Each loop after it to populate the list. Does that help?
I was hoping to avoid that route so that every enemy AI isn’t creating that list and that I’m not setting up the creation of that array manually at the start of every level, but I’ll give the latter method a shot.
Thanks
I forgot that I can’t cast to a Level and access its variables. Or can I?
do it with begin play and put those array in gamemode.