# Efficiently retrieve all objects with certain tag

**URL:** <https://forums.unrealengine.com/t/efficiently-retrieve-all-objects-with-certain-tag/365252>\
**Category:** C++\
**Tags:** object, tags, activate, unreal-engine, UE4, CPP, question\
**Created:** [July 26, 2016, 6:47pm UTC](https://forums.unrealengine.com/t/efficiently-retrieve-all-objects-with-certain-tag/365252 "2016-07-26T18:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gama97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gama97](https://forums.unrealengine.com/u/Gama97)\
**Post date:** [July 26, 2016, 6:47pm UTC](https://forums.unrealengine.com/t/efficiently-retrieve-all-objects-with-certain-tag/365252/1 "2016-07-26T18:47:56Z")

</div>

Hey so for the game I’m making I wanted to be able to activate/deactivate certain objects upon button press assuming they have a certain tag. I’ve had a look through some answers but the consensus seems to be that tags aren’t greatly efficient at the moment and I didn’t end up finding any solutions. Therefore I was wondering whether anyone could either providing an alternative approach to this or an example of how to retrieve objects with a certain tag in C++. All help appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![mxnko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mxnko](https://forums.unrealengine.com/u/mxnko)\
**Post date:** [September 9, 2016, 5:24pm UTC](https://forums.unrealengine.com/t/efficiently-retrieve-all-objects-with-certain-tag/365252/2 "2016-09-09T17:24:06Z")

</div>

Add your objects to an array during creation, and reference this array when you need access them efficiently.
