BluePrint at compile time problem.

Hello, i’m having some problem using construction script, when i compile, it’s ok, when i use it, that work too but if i compile again afte that, editor crash… so i won’t be able to edit my blueprint later and i don’t want that.

House (inherited from actor) :

  • Contain an Array of Stage : stages. (instances of HouseStage are auto added to this array but the array is set to instance editable else it is not serialized.)
  • Contain a float “StageDefaultHeight” (editable)

HouseStage (inherited from actor) :

  • contain a float “altitude” (not editable),
  • contain a bool “UseHouseHeight” (editable).
  • contain a float “height” (editable).
  • HouseStage contain a House manualy set in the editor.

How it work :

  • The construction node in House::ConstructionScript call : House::HouseUpdate()
  • HouseUpdate() call the func HouseStage::SetAltitudeAndHeight() on all stages (foreach).
  • The construction node in HouseStage call House::HouseUpdate() on his house.
  • There is no loop problem, the code work perfectly but not “at compile time” if i have already some instances added and settup to my game

House::ContructionScript :

House::HouseUpdate :

HouseStage::ConstructionScript :


Like i sayd, this work, the problem is at compile time if some instances are already added to the editor.

  • Do you know exactly why this happen?
  • Is there a way to say “do not exec” “at compile time” or “right after compile time”.

An other question that wont solve my problem but i just want to know, is there a way to set a variable (“in editor only”)?

My guess would be that you’re adding stuff in your Array over and over and the Editor doesn’t like it. I suggest you to get rid of everything that “Add” thing in your array to instead “Set” them (quote me if you want more details about this).

No but you have one little checkbox in the “Class Settings” pannel called “Run Construction Script on drag”. You might want to disable it.

At first i thought it was an “over and over” problem yes, but i added a bool check/set befor the House::Update() for lock this func and that didn’t change anything, even if i didn’t reset the bool after and so even if the Update() was anable to be call more than once (usefull^^).

Thank you for your answer, what is “on Drag” in this case ?

I know now what is the problem and how to solve it.
The problem is that if a blueprint affect some vars in an other blueprint and if both are open in editor, the editor crash if you try to compile, simply close all linked blueprint but one and you’ll be able to compile it. I don’t know if i should send that as an issue to epic because i think they know this problem.

Answer : If your editor crash when you try to compile a blueprint that is linked in some way to an other blueprint at editor time, you should try to close all blueprint but one, edit this one, compile/save and close, then open an other, do your stuff compile/save and close : One at a time.