Efficient way to identify components

Hi,

I’m working on a project where components can be individually disabled (made invisible with no collision) and also in groups of similar objects. For now I use tags to identify the groups of components to disable and I was wondering if there was a more efficient way? Looking up all components and checking for a specific tag is not very efficient I think.

I have several groups of components and each component in a group has another unique tag so I can find a specific components.

Thanks in advance!

If you made the objects blueprints, you can use event dispatchers to enable / disable. Then you don’t need tags or GetAllActors…

In the controller actor, you have:

In the minion actors:

Just a rough example.

Thanks for the answer. I have edited the question because it wasn’t clear what I meant with objects. They are actually components in a single blueprint. My blueprint object is divided in zones and each zone has multiple components attached to it. The problem is that the components inside a zone are the same for each zone, so to call upon a single component I need to know the zone and the component itself. So each component has a tag for the zone and a tag for its name.

Then I would do it with tags. They can have one tag for the zone and another for their function in the zone.