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

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?

As the chrismas period is now over; Bump.

yes please!

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

wondering about this one as well

1 Like

Running into this as well, these should be there.

1 Like

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

1 Like

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

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.

4.21 here and still not fixed!

just want to know if it is a bug or feature :confused:

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

1 Like

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!

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”.

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”?

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?

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.

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

1 Like

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

1 Like

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