[Blueprints] User defined variables reset to null when they are not marked editable

User defined variables seem to reset to null if they are not marked editable.
I made a quick blueprint to construct a blueprint class inheriting Object and otherwise empty, and set a variable called BugTestVariable to the created instance inside the construction script.
The blueprint would print out the reference of the object, and if the variable was marked as “Editable” the reference would stay, and if it was not marked as editable it would reset to null (None)

When the variable was marked as editable (Screenshot)

It would print (Screenshot)


And if it was not marked as editable (the only change I made)

Then it would print (Screenshot)


So variables that are accessed in the construction script seem to resets to null if it they not marked as editable?
(Also this is my first bug report, so if I’m posting it in the wrong place then I am terribly sorry)


I have replicated the issue in a new, fresh project and uploaded it [here][1].
Load up the “DebugMap” and make sure that “Show Status” (Ctrl + L) is checked under viewport settings.
When you move the object called “UE4BugTest” the construction script runs, and the blueprint “UE4BugTest” is supposed to check if the variable “BugTestVariable” is valid, if not then construct a new one and set it to “BugTestVariable”. And that is exactly what it does when “BugTestVariable” is set to editable, when it is not BugTestVariable resets every time the ConstructionScript runs. Just move “UE4BugTest” in the world to run the construction script, then open the blueprint and set “BugTestVariable” to editable and move it again and see the difference in the logs.

Hmm… Not sure I can follow what you are doing here, can you maybe set things up more simple / clean?

Also, did you compile before Play?

Yes, I did compile. I’m going to try to replicate the bug in an empty project, and upload it.


I have been able to reproduce your issue, and have entered a bug report, UE-32587. Thank you for your report.

Have a great day

Thank you :smiley: This issue has been a serious annoyance


This is not a bug. Consider the following scenario: The Actor is created on level and the EmptyObject is constructed. Then user removes the “Construct” and “Set” nodes (because the Empty object shouldn’t be spawned in the constructor anymore). If the value wasn’t reset, there would be no way to null the unwanted object instance (of course one could make the property editable and then null the value, but this is not a desired workflow)…