# (Very brief) Question on using a constant interface in GetAllActorsWithInterface

**URL:** <https://forums.unrealengine.com/t/very-brief-question-on-using-a-constant-interface-in-getallactorswithinterface/134399>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 3, 2019, 1:01pm UTC](https://forums.unrealengine.com/t/very-brief-question-on-using-a-constant-interface-in-getallactorswithinterface/134399 "2019-12-03T13:01:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VD\_D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VD\_D](https://forums.unrealengine.com/u/VD_D)\
**Post date:** [December 3, 2019, 1:01pm UTC](https://forums.unrealengine.com/t/very-brief-question-on-using-a-constant-interface-in-getallactorswithinterface/134399/1 "2019-12-03T13:01:36Z")

</div>

I want to find the actors which implement an intractable interface. I understand that GetAllActorsWithInterface expects an interface class reference, but specifically wants TSubclassOf\<UInterface\> In other words, what I’m asking is:

```auto

TArray<AActor*> InteractableActors;
UGameplayStatics::GetAllActorsWithInterface(GetWorld(), #Assuming I want to find all actors with interface IInteractable, what goes here?#, InteractableActors);
for (auto& InteractableActor : InteractableActors
{
   // Do stuff
}

```

---

<div class="post-metadata">

**Author:** ![VD\_D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VD\_D](https://forums.unrealengine.com/u/VD_D)\
**Post date:** [December 4, 2019, 8:22am UTC](https://forums.unrealengine.com/t/very-brief-question-on-using-a-constant-interface-in-getallactorswithinterface/134399/2 "2019-12-04T08:22:15Z")

</div>

It was literally just this:

```auto

 
 UGameplayStatics::GetAllActorsWithInterface(GetWorld(), UInteractable::StaticClass(), InteractableActors);  

```
