I need to do some sorting of actors at runtime.
I’ve tried having the actors register themselves on their BeginPlay event with the game mode. This is fine for creating the array of references, but how can I know when all instances of the actor have successfully reported in?
The other way is to use the GetAllActorsOfClass node, but how do I determine that the actors are in the game?
I can just use a delay node and assume the actors have been spawned after a certain length of time but, it would be better to just know.
One curious thing thats related:
it seems like the DoOnce node would be great for this problem. If I hook it up to this interface event that every instance of the actor is calling at BeginPlay, as you would expect it only prints one “Hello”.
But if I connect the further code where I grab all actors of that class, then I get a runaway loop error.
So is there any way I can code this without relying on assumptions?
Any help is appreciated.