# Trying to pass a variable from an actor to an animation blueprint or a pawn

**URL:** <https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804>\
**Category:** Blueprint\
**Tags:** actor, casting, unreal-engine, pawn, question, Blueprint\
**Created:** [February 11, 2025, 5:04pm UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804 "2025-02-11T17:04:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![schallundrauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@schallundrauch](https://forums.unrealengine.com/u/schallundrauch)\
**Post date:** [February 11, 2025, 5:04pm UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/1 "2025-02-11T17:04:08Z")

</div>

I’m new to Unreal and I’m struggeling to pass variables from an actor blueprint to an animation blueprint. When I’m using a pawn instead of an actor everything works but I want to apply animations to a metahuman which is an actor so how can I make this work?

Heres my working setup with a pawn:

 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/6/1f6920aec943cd26f998a9d3fbc41753a4a77190.jpeg)  
 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/6/7a6b98b195f5f4e0ca105ac51a5ffad8680aad73.jpeg)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/d/11de61d309f11ad5ea3558fdb136b4337cb1a684.jpeg)

And here is what I tried with the metahuman actor:

 ![5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/0/d801de44096acdfddf26573146298e3af45844b2.jpeg)  
 ![4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/c/a5cdc2ca706e73f9cdc85d24f8109d316aff7f16.jpeg)  
 ![6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/b/a9b7889e9e70d7807b87bfded7da51670bbd678e.jpeg)

I also tried to pass the variables from the actor to the pawn to then transfer them to the animation blueprint also without success. I read sth about that for this the pawn has to “own” the actor but I don’t know how to achieve this. I guess they have to be related to each other somehow so is that what is missing here?

Thanks a lot in advance!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 11, 2025, 5:28pm UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/2 "2025-02-11T17:28:40Z")

</div>

> [@schallundrauch](#):
>
> metahuman which is an actor

Instead of:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/6/ab69c8d02437aad566873adbe80e48ea095c30c5.png)

Try:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/f/aefd037bdb35be590bd98d3f1a880d1bb2848271.png)

You have it there in one of your screenshots, does it not work?

---

<div class="post-metadata">

**Author:** ![schallundrauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@schallundrauch](https://forums.unrealengine.com/u/schallundrauch)\
**Post date:** [February 12, 2025, 9:26am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/3 "2025-02-12T09:26:47Z")

</div>

You’re right it now works using this node! I tried it before but probably had sth else wrong then because it didn’t work before. So thank you! Can you explain why this node is needed?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 12, 2025, 9:36am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/4 "2025-02-12T09:36:29Z")

</div>

> [@schallundrauch](#):
>
> why this node is needed

You said it yourself. The metahuman is not a **Pawn** but a mundane **Actor**.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/0/0203aeb4974f0fc249bf97444f73110f60691bfc.png)

It all stems from inheritance. Actor is the base class, the deeper we go, the more specialised classes become:

- a Character is a Pawn and an Actor
- a Pawn is a Pawn (obv!) and an Actor
- an Actor is just an Actor - it does not know things Pawns or Characters can do

If you try to treat Metahuman Omar Actor who owns the Skeletal Mesh and the Animations as if was a Pawn, they will have no clue what you mean.

* * *

If you go Omar’s Class Settings:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/0/88048878c0fc8b41c627e52c4ceb646153a37bae.png)

You can re-parent it and make it a Pawn and the `Try to Get Pawn Owner` should now work.

---

<div class="post-metadata">

**Author:** ![schallundrauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@schallundrauch](https://forums.unrealengine.com/u/schallundrauch)\
**Post date:** [February 12, 2025, 10:38am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/5 "2025-02-12T10:38:21Z")

</div>

I think I got it now! Thanks a lot for your time, that really helped! 🙂

---

<div class="post-metadata">

**Author:** ![schallundrauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@schallundrauch](https://forums.unrealengine.com/u/schallundrauch)\
**Post date:** [February 12, 2025, 11:00am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/6 "2025-02-12T11:00:44Z")

</div>

Okay one last question: I created a variable from the Omar Blueprint and tried to plug that one into the Cast node which didn’t work. Is the difference that the `Get Owning Actor` returns the specific Omar instance that is in my scene while the Omar variable returns the general Omar blueprint that doesn’t have the animation tied to it?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 12, 2025, 11:10am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/7 "2025-02-12T11:10:12Z")

</div>

> the difference

It would be the same instance. Could you show the script? Or try it like so:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/b/a5bdfab7835081cd37abcc872fe8c1de63b8bd64.png)

---

<div class="post-metadata">

**Author:** ![schallundrauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@schallundrauch](https://forums.unrealengine.com/u/schallundrauch)\
**Post date:** [February 12, 2025, 11:27am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/8 "2025-02-12T11:27:00Z")

</div>

I just wanted to make sure that I undestand it correctly.

This is working because `Get Owning Actor` returns the Omar Blueprint Instance in my scene that has the animation Blueprint tied to it:

 ![7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/0/6709f6a2ff7dc00fae3e8687ec33c3d636de2757.jpeg)

This is not working because `Omar` returns the Omar Blueprint which doesn’t have the animation Bluepprint tied to it:

 ![8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/7/52723cca0a16497a91702906843e3709e505c135.jpeg)

Did I understand that right?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 12, 2025, 11:40am UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/9 "2025-02-12T11:40:49Z")

</div>

Where do you assign value to the Omar variable? It’s almost 100% null. The blue note is telling you there is no need to cast. Have a look at my previous post:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/0/b80cfd08c46f5e2ca2c2a25498aa99bae33f302a.png)

You can then use that variable without casting anywhere.

---

<div class="post-metadata">

**Author:** ![schallundrauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@schallundrauch](https://forums.unrealengine.com/u/schallundrauch)\
**Post date:** [February 12, 2025, 12:06pm UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/10 "2025-02-12T12:06:53Z")

</div>

Ahh I see it makes sense now! The variable didn’t have a value assigned, of course it’s not going to work without setting it first. Thanks again a lot, you really helped me out!

---

<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:** [March 14, 2025, 12:07pm UTC](https://forums.unrealengine.com/t/trying-to-pass-a-variable-from-an-actor-to-an-animation-blueprint-or-a-pawn/2327804/11 "2025-03-14T12:07:20Z")

</div>

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