I’m using 5.3 and live coding just NEVER saves any changes I’ve made in the editor per session. Does it ever work for anyone? I have to be missing something. I’ve tried live coding on a few projects and I’m always having to turn it off and hot reload. Any tips or advice to get it working?
There are things that won’t take effect with Live Coding such as:
" When changing default values for variables, values set in the constructor implemented in the .cpp
file will not update in existing instances of objects. However, if you change them in your .h
file, you will see the change take place."
quote from live coding ue doc
for big changes in my cpp, i usually just build in vs, and then open my project and small changes i used live coding.
sometime i need to reclear Intermediate folder for the project to actually take effect.
what do you mean by “NEVER saves any changes”
are these changes to:
- .cpp function flows are safe (assuming it doesn’t crash the project), but the constructor will not fire again until PIE is triggered, and even then the instances in the Level are likely to not receive the propagation as they “have already been constructed”
- .h changing the default values is “relatively safe” though not always great.
- adding/removing data members, changing member types, changing function signatures/names, adding/removing functions: all of these can/Will cause big side effects, where it may work for the duration of the Editor Session, but you “may” (80% of the time) need to rebuild any blueprint that utilizes those objects sometimes even if it is an
#include
for “knows of a” relationship. - adding/removing a
#include
or making a new class is full on Wishful thinking, and will just need to rebuild in VS with the editor closed. - changes to the blueprints outside of changes to the .h, assuming that you actually saved the Blueprints and the Editor didn’t crash then those changes should be going through the Intermediate, and Saved directories of the project.
- changes to the Levels would kind of be similar, but where everything is an instance
the intention of Live Coding is to be testing the C++ functionality, and flows to improve iteration of functionality changes that are then propagated through to the blueprints. then the Designers take that C++ functionality and separately build and conform the blueprints too it. By those intentions, you are expected during live coding to only be working on the C++.
for smaller teams where the “Engineer” and “Designer” are the same people this can create issues where to do a new blueprint type with live coding in mind:
- create the class skeleton in IDE
- go into the Editor and work on the function flows in Live Coding
- if no changes tot he class Skeleton are needed then Hot reload, or close and re-open the Editor (otherwise go back to step 1)
- fully build out the blueprint(s) based on that class