Live coding always detects changes even when none have been made

I was having issues with the editor randomly not detecting my C++ changes no matter how I tried to compile (through editor or in VS). It seems like lots of people encounter that (which surprises me for such a mature AAA engine) and the workaround people recommend is to either restart the editor all the time or to use live coding.

So I just enabled live coding and restarted everything. The first time I clicked compile in the editor it said no changes detected, which was correct as I hadn’t edited any C++. So then I changed something in C++ and hit compile again and it detected the changes. Perfect… except now every time I hit compile it still detects that same change and goes through the patching process, despite me not making any new changes.

This happens for every change I make to any CPP file now. They seem to get permanently marked as “dirty” even after being compiled.

Restarting the editor and VS make no difference.

In that screenshot, absolutely nothing was changed in between the two compiling runs but you can see it still thinks those same 3 files were modified (1 of them hasn’t been touched since restarting everything either).

I’m assuming this is not intended behaviour, so any ideas how I can fix it?

Yes, this happens to me too. Wastes a lot of time. Seems like it’s a bug or shortcoming of live coding. Is there an issue in the issue tracker, so we can upvote it?

This is my understanding:
LiveCoding generates new DLLs and links them into the running executeable. It’s going to re-build them every time until you stop and perform a build without the engine running.

I don’t think there’s a way around it, unless you want to try to make the LiveCoding components smarter…

1 Like

Yeah I eventually realised that doing a build from VS without the UE editor running will then “reset” the point at which the engine will patch new changes in from.

Unfortunately even with live coding I still ran into the same problem of my changes not being visible in the editor/game after compiling. Wasted hours thinking an event wasn’t being triggered when in reality it was working straight away but my changes just hadn’t been updated.

So I guess I’m back to just restarting the editor all the time to make sure things go through :confused:

Adding new classes or changing the structure of existing classes is not supported with Live Coding.