Live coding behaviour

Looked up some info on this subject as I’m very new to Unreal so just wanted some clarification on this behaviour as it seems a bit diferent to what you were describing.

I am using Unreal 5.0.3 and from what I have experienced the behaviour for live coding seems to work like this.

Adding the variable code to the source file for the Actor object will appear in the unreal project after the Live code button is used to compile.

If the project is then closed and reopened the variables are lost and to get them back I need to click the liveCode button again and the variables re appear. Also note that saving the unreal project makes no diference.

To make the variables permanent in the unreal project, I need to perform a full compile of the Actor Source code from the IDE (with the editor closed).
Then open the project in the unreal editor and I can see the variables, if I then change the values of the variables and save the project then reopen the values remain changed.

It seems the Live code is acting like a temporary solution to allow for testing but to commit permanent changes to the unreal project the source code needs to be recompiled from the IDE

Does this seem right, or is something not working as intended?

That’s pretty much been my experience as well. My platforms in Obstacle Assault stopped moving when I reopened the project the next day. Closing the editor and recompiling from Visual Studio brought things back to life again.

Not exactly sure if it happens 100% of the time though. Other than fixing the issue that first time, I haven’t really had to do that on a regular basis.

I’m fairly sure that’s not how it should be. Live Coding is a replacement for the old HotReload system (and what will be used if you disable Live Coding) and that definitely didn’t work that way.

The main issue with HotReload is when editing the header file or any constructor code. It is not uncommon to encounter weird bugs that were often resolved by just rebuilding.

So I would suggest you just disable Live Coding and just close the editor to build whenever you want to compile code that changed any header file or constructor.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms