# C++ GET ALL OBJECTS WITH INTERFACE???

**URL:** <https://forums.unrealengine.com/t/c-get-all-objects-with-interface/476294>\
**Category:** UI\
**Tags:** interface, actors, unreal-engine, objects, Widget, CPP, question\
**Created:** [December 23, 2020, 1:30am UTC](https://forums.unrealengine.com/t/c-get-all-objects-with-interface/476294 "2020-12-23T01:30:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zSSkitzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zSSkitzz](https://forums.unrealengine.com/u/zSSkitzz)\
**Post date:** [December 23, 2020, 1:30am UTC](https://forums.unrealengine.com/t/c-get-all-objects-with-interface/476294/1 "2020-12-23T01:30:40Z")

</div>

Hello! I’ve been using interfaces lately and I’ve noticed that there were Get All Actors/Widgets With Interface functions, but no Get All Objects With Interface. I’ve used my interface in some UObjects and I need to get a pointer to all the UObjects with the interface. This includes Actors, Widgets, and UObjects. Have I missed something and there is actually a function for this purpose or do I need to implement it myself. If so, how can I implement this? Thanks and have an amazing day!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c6d0c159](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c6d0c159](https://forums.unrealengine.com/u/anonymous_user_c6d0c159)\
**Post date:** [December 23, 2020, 1:34am UTC](https://forums.unrealengine.com/t/c-get-all-objects-with-interface/476294/2 "2020-12-23T01:34:27Z")

</div>

I even don’ know much about this interface. But I would like to learn more about it. Thank you so much!

---

<div class="post-metadata">

**Author:** ![zSSkitzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zSSkitzz](https://forums.unrealengine.com/u/zSSkitzz)\
**Post date:** [December 23, 2020, 1:39am UTC](https://forums.unrealengine.com/t/c-get-all-objects-with-interface/476294/3 "2020-12-23T01:39:47Z")

</div>

Wow! This is probably the fastest response I’ve ever gotten. Anyways I have a class, let’s call this MyInterface. MyInterface is setup normally but it has a few functions with the BlueprintNativeEvent specifier. The \_Implementation functions are virtual and overridable. MyInterface is also exposed to blueprints so I can use it in c++ and BP. Like I said in the question, UE4 provides functions to get all actors with interface and to get all widgets with interface but there isn’t a get all objects with interface. So how may I implement this? Unless I missed something.

---

<div class="post-metadata">

**Author:** ![zSSkitzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zSSkitzz](https://forums.unrealengine.com/u/zSSkitzz)\
**Post date:** [December 23, 2020, 5:48am UTC](https://forums.unrealengine.com/t/c-get-all-objects-with-interface/476294/4 "2020-12-23T05:48:16Z")

</div>

TArray\<UObject\*\> Array;  
for(TObjectIterator Object; Object; ++Object)  
{  
if(Object-\>Implements())  
Array.Add(\*Object);  
}
