Stuck in a catch-22 and my project is totally inaccessible.

I have my project on 5.1 all bps. I decided to add a few custom c++ classes from a previous 4.26 project.

I get the whole project needs to be rebuilt from source error, no big deal I’ll generate the snl file and rebuild in vs2019.

Okayyyy, so I guess ue5 has something called “live coding” that doesn’t allow you to rebuild your project manually??? To access the setting to disable it… I need to open my project and change the setting within ue5, which I can’t do until manually rebuilt, which I can’t manually rebuild it as the live coding is giving me an error, which prevents from a successful build that I need to open up project and change the settings.

Is my project just straight up ruined now??

This is the error I get:

Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game

I don’t have any engine, or the project opened at all, the keyboard shortcut does nothing.

Did you try building for Development Editor in visualStudio?

1 Like

I’ve been having a problem occur where the editor process doesn’t actually close. Go check if UnrealEditor.exe is open under the details tab of Task Manager and kill it if it is, then try again. I have a hunch this is what’s causing your problem. I’m not sure if this is something widespread or caused by a plug-in I use or something though, so I could be wrong.

1 Like

Everything appears to be closed, I can do a fresh restart and the problem persists.

I just use the build solution button at the top, I don’t know what building for development editor means…

I would recommend following this guide when adding C++ classes in a BP project.
It’s very short and covers all things you need to do in order to convert an existing BP project to BP & C++

Development Editor means you’re doing a partially optimized build that will also run in the editor. I just looked at the UBT source code and found that it also means that Live Coding will be enabled…unless you disable it in your Target file!

So I think if you do the following you can fix your problem:

Go to MyProject.target.cs (replace MyProject with your name).

It should look like this:

using UnrealBuildTool;
using System.Collections.Generic;
public class MyProjectTarget : TargetRules
{
    public MyProjectTarget(TargetInfo Target) : base(Target)
    {
        Type = TargetType.Game;
        // Other properties go here
    }
}

(From this documentation page)

Now where it says // Other properties go here, you should be able to put bWithLiveCoding = false. Try to build it after that and see if it works. If it doesn’t, try regenerating the Visual Studio solution and see if it works after. Good luck, hope this fixes it.

@PerCat any luck?

I know this is a while later but I ended up just using an old version of my project and sticking to 4.26, i actually just ported it over to 5.1 a few days ago and it seems alright now; no idea what the problem initially was or what was fixed.