Local variable of type struct array resets default values on editor restart

If you have a local BP variable that is an array of structs, and you pre-fill that array with some default values (and compile/save), those values will be gone after you restart the editor. This only happens with local variables (class variables keep their values fine), and only with structs (a local array of ints keep their values fine).

To reproduce in blank UE4.16.3:

  1. Make a struct, give it a property of type Name.
  2. Make an actor, and a blank function. Add a local variable that is an array of your new struct.
  3. In the variable defaults, add two entries and set the name of each to something unique.
  4. Restart the editor, go back to your local variable and note that it now has a single, empty entry.

Hi Spoondog,

Thank you for the report. I believe this was fixed in 4.17. I just tested it there using your repro steps and couldn’t reproduce it. Feel free to double-check that if you like.

Thanks,
-TJ