4.15.x: Hot Reload Corrupts Blueprints

On a Windows 10 machine, with the 4.15.1 engine, using Visual Studio Community 2015. Basically what happened was this:

  1. While Unreal was open, I made changes to various c++ game objects.
  2. I compiled the code using the compile button in the editor.
  3. Because blueprints was accessing some of the edited code, I shut down Unreal and then opened it up again. In my experience, any blueprint will not compile properly after editing and recompiling shared C++ code using the editor compile due to a object link issue. So my solution is to simply close the editor and load it again. This has worked without fail since 4.8
  4. I then do some work in my GUI blueprint and compile it successfully.
  5. I then shut down the Unreal editor and left VS and the Unreal launcher open. My computer then went into sleep mode on and off for a week or so.

So, at this point, everything had compiled correctly in 4.15.1. There are no C++ or Blueprint compilation errors and, again, I am pretty much using the some workflow since 4.8.

Today I open up my project and there are a hundred+ error messages. All of the errors are the same:

LogLinker:Error: HOTRELOADED_PopCenterStruct_0 has an inappropriate outermost, it was probably saved with a deprecated outer

Hmm. I recompile the code again in both the editor as well as in Visual Studio and there are no errors. I then noticed that there was a huge compile error for Blueprints. I took a look and the errors are all the same:

Error The current value of the ’ Target Array ’ pin is invalid: Array inputs (like ‘Target Array’) must have an input wired into them (try connecting a MakeArray node).

Taking a look at the actual error, the following has occurred:

132893-corrupt.png

So the object reference was more or less destroyed in blueprints and probably close to a 100 nodes were all disconnected. Probably the most important thing to note is that this happened to me one other time using 4.15.0. The same exact thing. And the object in question wasn’t even edited in C++ the first time around.

Now, the good news is that I set Unreal to only save blueprints on a successful compile so, in theory, I still have a good version of my gui.

So, my questions are this:

  1. How can someone avoid this in the future? It seems to be specific to 4.15 and it has happened twice.
  2. If I have good C++ code and a good version of the blueprint GUI, what do I do in order to get things to mesh? Is there some .dll or temp files I can delete to get rid of any hot reloads?

Any help would be appreciated.

Deleting all binaries and reloading an older, good version of the blueprint in question does not solve this problem.

Shouldn’t your version control be able to get you back to an un-broken version of your blueprints? Sounds to me like you only need to do a “undo pending changes” or whatever it is called in your vcs?

Looks like this is a known bug with 4.15:

Workaround:

“If the node is already placed in the blueprint, saving the blueprint before compiling code and/or declining to save changes to the blueprint will show the updated node (TestVar3) on project restart.”