# Why don't "Expose on Spawn" variables show as input nodes on Spawn AI From Class nodes?

**URL:** <https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934>\
**Category:** AI\
**Tags:** variables, spawn-actor, unreal-engine, question\
**Created:** [December 19, 2015, 9:02pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934 "2015-12-19T21:02:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spit\_Fyre633](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spit\_Fyre633](https://forums.unrealengine.com/u/Spit_Fyre633)\
**Post date:** [December 19, 2015, 9:02pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/1 "2015-12-19T21:02:07Z")

</div>

If I use Spawn Actor, the variables are shown, but when using Spawn AI, they are not. Is there a specific reason for this, or is it a bug?

 ![71287-spawnvars.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/3/f83aefe01dd638c2aee22c0576acd3a3f715f777.jpeg)

---

<div class="post-metadata">

**Author:** ![Spit\_Fyre633](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spit\_Fyre633](https://forums.unrealengine.com/u/Spit_Fyre633)\
**Post date:** [January 10, 2016, 9:12pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/2 "2016-01-10T21:12:02Z")

</div>

As the chrismas period is now over; Bump.

---

<div class="post-metadata">

**Author:** ![Brahzoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brahzoo](https://forums.unrealengine.com/u/Brahzoo)\
**Post date:** [January 28, 2016, 4:26pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/3 "2016-01-28T16:26:39Z")

</div>

yes please!

---

<div class="post-metadata">

**Author:** ![Arcade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arcade](https://forums.unrealengine.com/u/Arcade)\
**Post date:** [August 15, 2016, 5:31pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/4 "2016-08-15T17:31:18Z")

</div>

Has this been resolved, as I’m also curious?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_52bf184c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_52bf184c](https://forums.unrealengine.com/u/anonymous_user_52bf184c)\
**Post date:** [November 13, 2016, 1:16am UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/5 "2016-11-13T01:16:02Z")

</div>

wondering about this one as well

---

<div class="post-metadata">

**Author:** ![Morkath](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Morkath](https://forums.unrealengine.com/u/Morkath)\
**Post date:** [December 31, 2016, 2:58pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/6 "2016-12-31T14:58:49Z")

</div>

Running into this as well, these should be there.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_46bfc69d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_46bfc69d1](https://forums.unrealengine.com/u/anonymous_user_46bfc69d1)\
**Post date:** [May 20, 2017, 10:53am UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/7 "2017-05-20T10:53:31Z")

</div>

ran into this today so it’s still happening in 4.15.2. Can anyone on Epic staff answer if this is intended behavior?

---

<div class="post-metadata">

**Author:** ![GG-GoraGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gg-goragames/32/1081623_2.png) [@GG-GoraGames](https://forums.unrealengine.com/u/GG-GoraGames)\
**Post date:** [December 28, 2017, 11:07pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/8 "2017-12-28T23:07:51Z")

</div>

Still here in 4.18 😉  
And what happend to the vars that realy need to be expose on spawn?

---

<div class="post-metadata">

**Author:** ![EndersGame0327](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EndersGame0327](https://forums.unrealengine.com/u/EndersGame0327)\
**Post date:** [September 4, 2018, 8:10pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/9 "2018-09-04T20:10:36Z")

</div>

bump - please for the love of god Epic - I’m a game developer - this functionality is vital when I want to dynamically spawn AI with different variables that need to be initialized on spawn… but maybe there is something I’m missing or doing wrong where this functionality isn’t needed to achieve the same behavior.

---

<div class="post-metadata">

**Author:** ![GG-GoraGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gg-goragames/32/1081623_2.png) [@GG-GoraGames](https://forums.unrealengine.com/u/GG-GoraGames)\
**Post date:** [September 5, 2018, 1:23pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/10 "2018-09-05T13:23:17Z")

</div>

4.21 here and still not fixed!

---

<div class="post-metadata">

**Author:** ![LeonKendel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeonKendel](https://forums.unrealengine.com/u/LeonKendel)\
**Post date:** [January 18, 2019, 5:12pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/11 "2019-01-18T17:12:47Z")

</div>

just want to know if it is a bug or feature 😕

---

<div class="post-metadata">

**Author:** ![Kuroodo\_Ditory](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kuroodo_ditory/32/567661_2.png) [@Kuroodo\_Ditory](https://forums.unrealengine.com/u/Kuroodo_Ditory)\
**Post date:** [June 28, 2019, 5:40pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/12 "2019-06-28T17:40:48Z")

</div>

Bump. It’s been almost 4 years.

I think the issue is that Spawn AIFrom Class returns a Pawn Object Reference, whereas SpawnActor From Class returns the actor class itself

---

<div class="post-metadata">

**Author:** ![TheFlow3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFlow3k](https://forums.unrealengine.com/u/TheFlow3k)\
**Post date:** [August 17, 2020, 12:45am UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/13 "2020-08-17T00:45:24Z")

</div>

Five years over and no solution?  
Is this a bug or a feature? My estimation was that all AI Actor properties with “Expose on Spawn” enabled are editable on Spawn with “Spawn AI from class”. Same as for “Spawn Actor”. On “Spawn Actor” everything is fine. “Spawn AI from class” has no pins for the “Expose on Spawn” properties?  
Is there any way to edit the “Expose on Spawn” properties after “Spawn AI from class” in another BP node? Would be great when we can benefit from “Expose on Spawn” properties also for “Spawn AI from class”.  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![TheFlow3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFlow3k](https://forums.unrealengine.com/u/TheFlow3k)\
**Post date:** [August 18, 2020, 9:11am UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/14 "2020-08-18T09:11:20Z")

</div>

After having the same question and testing how to solve, I tried using “spawn actor” just for my AI Pawns. And it worked also. So, my solution ist, just not using “spawn AI from class”, but using “spawn actor” to spawn my AI. For now, I see no bugs occurring using “spawn actor” instead “spawn AI from class”. And advantage of “spawn actor” your have all properties of the AI actor/pawn you set to “Expose on Spawn” right available.

Hope that helps next one who is facing this problem.

As side note: For me it is a bug and Epic should fix it and make “Expose on Spawn” properties of course also available for “spawn AI from class”.

---

<div class="post-metadata">

**Author:** ![TheFlow3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFlow3k](https://forums.unrealengine.com/u/TheFlow3k)\
**Post date:** [August 19, 2020, 12:18am UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/15 "2020-08-19T00:18:48Z")

</div>

Just found some disadvantages. “Spawn Actor” has no “No Collision Fail” option. That’s better for spawning AI, because it spawns also on collision problems. After changing to “spawn actor” to be able to use “Expose on Spawn” properties, I have no more errors on collision as before.

Back to topic… Somebody has a better idea how to use “Expose on Spawn” properties with “spawn AI from class”?

---

<div class="post-metadata">

**Author:** ![Spit\_Fyre633](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spit\_Fyre633](https://forums.unrealengine.com/u/Spit_Fyre633)\
**Post date:** [July 16, 2021, 8:09pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/16 "2021-07-16T20:09:27Z")

</div>

So, to all those that might still care about this, I had something of an epiphany last night - I haven’t tried this out properly yet, as my current project has no AI implemented yet for me to test with, but I feel like this kind of setup is going to be the work around. It’s still going to be very longwinded if you have dozens of variables to set, and each requires a new “Set” node, but it looks like it should still work, if someone can get back to me and let me know?

 ![344329-spawnai-from-class.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/6/3a6b8372391251b0d49ee75465614487666ec393.png)

---

<div class="post-metadata">

**Author:** ![\_reb1rth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_reb1rth](https://forums.unrealengine.com/u/_reb1rth)\
**Post date:** [November 21, 2021, 5:01pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/17 "2021-11-21T17:01:50Z")

</div>

This doesn’t work if you’re using a Behaviour Tree. My tree depends on my AI Team Gameplay Tags, which need to be set before the tree runs (adding to container in AI Character’s ConstructionScript). Maybe it’s possible in C++, I’ll have to look or find another solution.

---

<div class="post-metadata">

**Author:** ![emperor\_katax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/emperor_katax/32/1070178_2.png) [@emperor\_katax](https://forums.unrealengine.com/u/emperor_katax)\
**Post date:** [October 8, 2022, 1:42pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/18 "2022-10-08T13:42:40Z")

</div>

… here in UE 5.02 and same problem exist … can you please fix this? … sounds like an easy fix thou.

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [October 11, 2022, 4:04am UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/19 "2022-10-11T04:04:23Z")

</div>

I guess “Expose on spawn” is one blueprint node with black magic and the other is a function call. btw, it also happens to “Spawn actor” if you put the class with the pin

yes, “Expose on spawn” is a nice way to do that, but I’m sure it’s the same result because everything happens in the same frame.  
You could do it in a function to pass more data at once and avoid casting multiple times

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/6/2/e625054bef7c8ab61e15d6ee2a182866116861d2.png)

---

<div class="post-metadata">

**Author:** ![Sevascom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sevascom](https://forums.unrealengine.com/u/Sevascom)\
**Post date:** [February 10, 2023, 12:00pm UTC](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934/20 "2023-02-10T12:00:09Z")

</div>

4.27 same error but in Drag Drop operation  
upd. lol the problem was that one of the blueprint could not be compiled

[Next page](https://forums.unrealengine.com/t/why-dont-expose-on-spawn-variables-show-as-input-nodes-on-spawn-ai-from-class-nodes/341934.md?page=2)
