Download

"Get All Objects of Class"

Is there a way to perform a similar function to “Get All Actors Of Class” with blueprints, now that you can Construct Object in blueprints, and not just Spawn Actor?

I have two use cases:-

  1. I want to enumerate all objects I have instantiated regardless of their parent, as they could have been instantiated in different places for different purposes
  2. I want to be able to loop through all sub classes of a parent class, and instantiate an object of each class type (e.g. instead of having an array of “Quest” actors, I have an array of Quest objects, of various Quest object sub classes.

Would be a helpful feature, but i can’t find anything like it.

did you tried using ForEach loop node?

Just a small node: Keep in mind that UObjects CAN’T be replicated in Blueprints only! Replication only works from AActor on.
So if you quests should be replicated/managed by the Server or something like that, you will not want to use UObjects as long as
you work in Blueprints! (Someone correct me if i’m wrong).