Iterators - Finding all "UDestructibleComponent" In Scene

Hey all,

I’m trying to iterate through my world and gather information on all the UDestructibleComponents I have so I can interact with them.

I can get the DestructibleActors and push them into an array using:

TActorIterator<ADestructibleActor> Itr = TActorIterator<ADestructibleActor>(GetWorld());

Is there a specific type of Iterator, or a different way to gather an array of UDestructibleComponents from the World?

Thanks in advance.

AFAIK no.

TActorIterator is already an improvement of TObjectIterator.

You can find an old discussions about iterators here started by Rama.

You might have already read Rama’s wiki about iterators, if not take a look :wink:

Thanks for more information on Iterators.

I ended up finding a much less expensive way of doing what I need, so I don’t need to cycle through all the destructible components in a scene.