# How can I create a "Select Actor" popup

**URL:** <https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277>\
**Category:** UI\
**Tags:** unreal-engine, question\
**Created:** [December 9, 2024, 11:53am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277 "2024-12-09T11:53:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAuzanneau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jauzanneau/32/978097_2.png) [@JAuzanneau](https://forums.unrealengine.com/u/JAuzanneau)\
**Post date:** [December 9, 2024, 11:53am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/1 "2024-12-09T11:53:54Z")

</div>

Hi,

I’m trying to create popup, similar to the one where you set a reference for a variable:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/b/68b947c894d81518c257615852fdc8c88773d6e3.png)

I would like to be able to select multiple actors (one is fine too) and get an array of references (or pointers) that I can use later in code.

Can anyone help me with this, or maybe link me a few tutorials that might help? Thanks a lot

---

<div class="post-metadata">

**Author:** ![PREDALIEN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/predalien/32/1194670_2.png) [@PREDALIEN](https://forums.unrealengine.com/u/PREDALIEN)\
**Post date:** [December 9, 2024, 12:04pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/2 "2024-12-09T12:04:18Z")

</div>

> [@JAuzanneau](#):
>
> later

Soft Object (Actor) Reference? 🤔

Can you describe in more detail what/why you need this?

---

<div class="post-metadata">

**Author:** ![JAuzanneau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jauzanneau/32/978097_2.png) [@JAuzanneau](https://forums.unrealengine.com/u/JAuzanneau)\
**Post date:** [December 9, 2024, 12:15pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/3 "2024-12-09T12:15:58Z")

</div>

I’m trying to make an editor widget that lets me select actors to export. I don’t want to use `File > Export Selected...` everytime, so I wrote a simple C++ function that calls the correct function for my use case.

I want a widget to have an intuitive user experience when exporting my actors, instead of selecting them from the level.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/8/288fcf731f09b68bb6cc96f98f13af22b74c8ac6.png)

In this example widget, I’d like the “Select” button to open the popup and let me chose multiple (one is fine too) actors. I will then call a C++ that takes the array of actors as parameter

---

<div class="post-metadata">

**Author:** ![PREDALIEN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/predalien/32/1194670_2.png) [@PREDALIEN](https://forums.unrealengine.com/u/PREDALIEN)\
**Post date:** [December 9, 2024, 12:28pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/4 "2024-12-09T12:28:01Z")

</div>

You can select the actors you want in the level (in the Outliner) as usual and get a list:

```auto
	TArray<AActor*> Actors;
	GEditor->GetSelectedActors()->GetSelectedObjects<AActor>(Actors);

```

---

<div class="post-metadata">

**Author:** ![JAuzanneau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jauzanneau/32/978097_2.png) [@JAuzanneau](https://forums.unrealengine.com/u/JAuzanneau)\
**Post date:** [December 9, 2024, 12:32pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/5 "2024-12-09T12:32:07Z")

</div>

I’m trying to avoid having to select the actors from the outliner. I find it unintuitive and it can become a hassle to select multiple actors far apart from each other in big levels.

I can already select them from C++ this way (once I have a pointer):

```c++
// Mark actors as selected
for (AActor* Actor : Actors) {
	GEditor->SelectActor(Actor, true, true);
}

```

What I’m looking for is how to create the popup window, similar to the screenshot in the original post.

---

<div class="post-metadata">

**Author:** ![PREDALIEN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/predalien/32/1194670_2.png) [@PREDALIEN](https://forums.unrealengine.com/u/PREDALIEN)\
**Post date:** [December 9, 2024, 12:35pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/6 "2024-12-09T12:35:14Z")

</div>

> [@JAuzanneau](#):
>
> unintuitive

You can make an Actor Action Utility that is launched via the RMB context menu on the actor(s).

> [@JAuzanneau](#):
>
> far apart

Outliner tab solves this.

> [@JAuzanneau](#):
>
> popup window, similar to the screenshot

You can use Single Property View or Details Views (for array) widget.

---

<div class="post-metadata">

**Author:** ![JAuzanneau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jauzanneau/32/978097_2.png) [@JAuzanneau](https://forums.unrealengine.com/u/JAuzanneau)\
**Post date:** [December 9, 2024, 12:36pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/7 "2024-12-09T12:36:14Z")

</div>

I’ll look into it, thanks

Edit: SinglePropertyView was close enough to what I had in mind.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 8, 2025, 12:36pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-select-actor-popup/2188277/8 "2025-01-08T12:36:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
