BP: Spawn Actor doesn't use expose on Spawn variables


when I spawn a Actor, and set a exposed variable to something within node, it doesn’t have any effect. However If i hook up a node as input it will work.

E.g. value of 7 for “New var 0” won’t be set on Spawn. But if I hook up 5+2 node, Actor will spawn with a 7 as New Var.


Hey ,

I wasn’t able to reproduce any problem with Expose on Spawn. To test, I created a new Actor Blueprint with a Float variable, ExposeMe, that was marked as Editable and Expose On Spawn, with a default value of 0.0. On Event Begin Play, I had it print value of variable. I then created a second Actor Blueprint to act as a spawner, which on Event Begin Play uses Spawn Actor from Class node to spawn first Actor BP. I set value of variable to 7.0, and dropped spawner in level. On PIE, it printed 7.0 as expected.

Did I miss any steps you took to get this to happen? Are you able to reproduce it in a new project, or only your current project?

I have indeed a somewhat more complex setup but using this setup I still didn’t manage to reproduce it in a clean project. Sorry for not attempting this step before my report. Though, Issue appeared so general that I didn’t think it would be necessary.

I suppose cause is buried somewhere in depths of my Project and since fix is relatively simple for now (just hook up any node) I’m fine if this gets marked as solved. If I find any way to reproduce it, I will of course ping back.

Trying doing expose on spawn with a struct as input. In 4.7 this was a bug at least. My work around for that is to make a custom event Initialize to set struct variable…

I’ll probably do that, since we can’t reproduce it. Out of curiosity, did you convert this project from 4.7.6, and if so, was this node created in that engine version?

Yeah, I converted Project, and particular node from screenshot probably existed too. However I did of course attempt to replace node with a fresh one, same issue.

Okay, I tried converting a project from 4.7.6 and still can’t get this to reproduce. I’ll go ahead and resolve post for now, but if you’re able to narrow it down at all please let us know. Thanks for report!

Hello, I stumbled across this problem today, I believe it’s a bug.

It seem that SpawnActor node is not generated correctly when Actor to Spawn class input value comes from output of another node, instead of using dropdown list.

A workaround I found is to first select Input Class from dropdown to select input class you want ( node will transform correctly), and THEN use output value from elsewhere of same class to connect it. (It will not transform because it already has done).

So, if node is transformed using dropdown it will work correctly, even if you use class value from somewhere else later. If node is transformed first using class value from somewhere else it will bug.

Sometime I struggle with english, so I made a video to show this: - YouTube

This occured in 4.8 and 4.9Preview4 versions of Engine.

Edit: mute video

Hi ,

How are you populating your class variable? From what I could see, you are currently passing a Null value into your spawn actor from class node, which will return false and none as your video shows.

I set it right before placing it in event graph at 1:16. You can see on right at detail’s panel. actor is being spawned in level.

Hi ,

I haven’t been able to reproduce this on my end. Once I set default value of class variable objects spawned exactly as I expected them to. Do you have any other stops I can take to reproduce this on my end?

That’s weird (or normal?). Did you connect get class to spawn actor node when spawn actor node is at it’s default state? If you do that it should ignore Input values of exposed variables, and keep defaults.

I made another video: https://www…com/watch?v=j-ISEfXO2BA

Do you have a sample project this is occurring in? I’d be happy to take a look. Thus far I haven’t been able to reproduce this on my end.

Sure. I made this project on a different computer and had same result: link text

Hi everyone,

Thank you for project, . I was able to reproduce this and have entered a bug report, UE-20523, to be assessed by development staff.


I am reproducing this bug in 4.10.1 with a boolean, default set to false.
spawn actor box sets it to true, and it’s still false in constructor and in begin play.
If I connect a boolean literal set to true to pin, it’s correctly set to true in constructor and in begin play.

HI operthuis,

I looked into UE-20523, it has been fixed internally and is slated for a future release. Please keep a lookout for release notes for additional information.

I have this problem with a bool set to true. It always spawns with bool set to false no matter what I’ve tried. Is epic actively against testing and QA? You’ve had a constructor error in ur engine now for over half a year.

Same problem here

tip that “” said is working for now

i will try to reproduce this bug in a simple project and if i can do it i will give you project and steps to produce bug and to fix it with “” solution

, will that make it into 4.11 final?