Relaunching the editor after compiling with live coding seems to not save the changes.

I have recently started using C++ after becoming comfortable with blueprints. In order to compile quickly and easily, I have been using Live Coding. However, I have noticed that when I make changes using Live Coding and then relaunch the editor, those changes disappear unless I activate Live Coding again. Specifically, I’m referring to changes such as displaying a variable in the editor using UPROPERTY.

I understand that if I build the project, these changes will be visible. But I thought Live Coding also builds the project while the only difference is it is building while the engine is running. Perhaps I have misunderstood the concept of Live Coding. There is another issue I would appreciate help with: when I use Live Coding to display a variable in the editor and then change its default value through the editor, and then relaunch the editor without building it, the variable is not displayed. However, if I build the project and launch it again, not only is the variable displayed, but it also retains the default value I set in the editor after using Live Coding.

My confusion here is from the fact that if I relaunch the editor without building it after using Live Coding, the variable and its default value are lost. But since the variable is still present in the code, I expected to see it when I build the project not the default value I set. Where is the default value stored in this case?

are you using #if directives?
what are the arguments you are giving the UPROPERTY?
what are the data types of the things that are disappearing?

Live coding is a mechanism to help with rapid iteration (you don’t have to close the editor every time you make a change) for the .cpp changes.
changes to .h files often times trigger issues, and might still need to have the editor close, and re-open.
if you don’t close down the editor to make changes to the .h then you can end up where the Editor overwrites the objects type with a “LIVE CODING [ObjectType]” which CAN stop existing when the editor is closed.

so live coding is great as long as you define the skeleton of the class in the .h file, and even if you fill in the definition of the cpp on the fly as long as you don’t change the .h things SHOULD be fine.

1 Like

the Editor overwrites the objects type with a “LIVE CODING [ObjectType]”

this happened to me, any ideas how to fix it? I really don’t want to rewrite my entire data table from scratch because live coding changed the structure. Based on the txt version of the table it seems like all the data is still there.

Just turn off live coding and compile from your IDE. Just make sure you detach any debuggers before compiling.