# Get reference to an actor placed in a level?

**URL:** <https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824>\
**Category:** Editor Scripting\
**Tags:** reference, actor-blueprint, unreal-engine, question\
**Created:** [August 2, 2018, 5:33pm UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824 "2018-08-02T17:33:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1a1a0e3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1a1a0e3a](https://forums.unrealengine.com/u/anonymous_user_1a1a0e3a)\
**Post date:** [August 2, 2018, 5:33pm UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/1 "2018-08-02T17:33:14Z")

</div>

How do i reference an actor placed in the level (of type empty actor) so i can assign it as the owner of something else?

---

<div class="post-metadata">

**Author:** ![Pavelioso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pavelioso](https://forums.unrealengine.com/u/Pavelioso)\
**Post date:** [August 2, 2018, 5:42pm UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/2 "2018-08-02T17:42:36Z")

</div>

You can use “get actors of class”. If you have just one, you can just take the array from it, use get node. If you have multiple, you can assign a tag to that specific actor and then use “get actors with tag” (not sure if this one is called like that). Or use loop with “has tag”.

---

<div class="post-metadata">

**Author:** ![Placinta8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Placinta8](https://forums.unrealengine.com/u/Placinta8)\
**Post date:** [August 3, 2018, 12:14pm UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/3 "2018-08-03T12:14:28Z")

</div>

Get all actors of class also works for multiple actors, but you have to connect it to a for each loop instead of a get node.

---

<div class="post-metadata">

**Author:** ![Xilverback](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xilverback](https://forums.unrealengine.com/u/Xilverback)\
**Post date:** [November 26, 2020, 9:22pm UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/4 "2020-11-26T21:22:24Z")

</div>

I had to share since this alternative works for me. If you’re trying to access one actor from another placed in the level. Basically you can add a variable in the blueprint of the first actor that is a public reference to an actor. Then you can use the eyedropper to select the second actor. This is good for chaining actions in your level.

---

<div class="post-metadata">

**Author:** ![JBL8686](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JBL8686](https://forums.unrealengine.com/u/JBL8686)\
**Post date:** [March 15, 2021, 2:57pm UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/5 "2021-03-15T14:57:34Z")

</div>

MY SOLUTION - For anyone finding this later, I needed to automate the “Get all actor by class” but couldn’t reference class/actor by anything but class. So I added a tag to the actor and used “Get All Actors with Tag”, get array ref, 0 index, prosper!

---

<div class="post-metadata">

**Author:** ![inkblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@inkblade](https://forums.unrealengine.com/u/inkblade)\
**Post date:** [January 30, 2023, 8:02am UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/6 "2023-01-30T08:02:21Z")

</div>

In blueprint, if you want add reference node to object in level, just select the object in level, then you blueprint, right click to add the node.

---

<div class="post-metadata">

**Author:** ![wade0608](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wade0608](https://forums.unrealengine.com/u/wade0608)\
**Post date:** [August 16, 2023, 7:42am UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/7 "2023-08-16T07:42:48Z")

</div>

But if I want to add reference node in widget blueprint. How can I do?

---

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [October 6, 2023, 1:40am UTC](https://forums.unrealengine.com/t/get-reference-to-an-actor-placed-in-a-level/430824/8 "2023-10-06T01:40:53Z")

</div>

Just in case anyone was trying to do something similar to what I was…

I have an enum for my NPC that determines its type (Normal, Super, Ultra etc.) which is something I change when placing the NPC in the level. I was trying to code a system so that if something goes wrong during navigation (ie the NPC gets stuck) it will try to reposition the NPC 3 times, and if every attempt to reposition is unsuccessful, then it would spawn a replacement NPC and match its NPC type. The issue I was having is that I couldn’t just get the Enum because it would default to the one at the top of the list, not the one from the NPC placed in the world. Then I realized I could use BeginPlay to get the Enum value and promote this to a variable and this gets me the correct adjusted spawned value and not just the default value.
