Source build - Can I build engine once and build Project code within editor?

Hi - I am a novice at unreal.

I’m working on an existing unreal project. It’s currently using a customized unreal 4.27 that is referenced in the project.

Whenever I make changes in the game logic it requires me to close the editor and rebuild from visual studio. Is it possible for me to build the customized unreal engine once then just load the Project file from there as a normal unreal project? Whenever I try to open it it complains about mis-matched versions and then says the modules are out of date. When I try to rebuild it says it can’t do it while the engine is open…

Any help is appreciated!!

Do you only have 1 visual studio solution for both the engine and your project? Or do you have your project in a separate locaiotn?

Does your game show up in the directory of your visual studio solution or does it just say UE4 at the top?

You should be able to edit just like normal unless you need to add a plugin or something major requiring C# or C++. Those modules being out of date is some kind of persistent problem that it appears to be a problem for A LOT of people building from source it seems. I just went through this and it took forever and a lot of headache with no answers. Forgive the length, but I want to get this out there to help some devs out. The modules are likely plugins like AdvancedSteamSessions?

I was only able to add the plugins in without that message by manually adding the plugins into the plugins folder inside the project directory in File Explorer, then first deleting the intermediate and binaries folders and then clicking generate visual studio files. If you don’t place the plugins in that folder it will always ask if you want to rebuild them and for me (100 times) doesn’t build them. Just says, “Can compile while editor is running” or something like that. It is super critical to copy/use the plugins folders FROM WITHIN THE ENGINE BUILD or it will always say out of date. It has to be in the order described above or you can try it like me literally 100 times until it works lol.

If all the directories are collapsed(closed) it should read “Solution ‘YourProject’” > Engine > Games > Programs > Visualizers.

Unfortunately, at least for me, I had to manually add the required Build.cs, YourProject.cpp, YourProject.h and YourProject.Target.cs files before it would even show up in the stack properly therefore it wouldn’t build correctly and say some nonsense about modules being out of date every time I opened the project.

I obtained those files from creating a NEW C++ project with a character class from the ThirdPersonTemplate and yanked the code from inside everything and placed it exactly like it was in the new project. You have to right click on the directory and “Add New” in VS. That was inside my existing blueprint project in VS. Simply adding an empty C++ class in the editor doesn’t work for existing blueprint projects built in a binary build. Those critical build.cs and target files wont be generated.

If “Games” and inside that “YourProject” aren’t showing up its not configured correctly… Once everything is in place and showing properly, select the dop down at the center top of VS and select “Development Editor” and beside that Select “Win64” unless you’re working on something weird and/or outdated. After that right click on your project name and select “Build”. That should be it. Double click your uproject file and then it should open and edit like normal.

I’m probably missing a couple little things here, but I’ll lament on them if anyone else comes in on this. There are some other obscure issues with these existing blueprint projects made into source that show their ugly face when packaging and its mostly caused from missing C++ or C# code and that is going to be on the individual to figure out. lol.

Also, for dedicated servers you’ll want to create your YourProjectServer.Target.cs files to make the target available in the editor for packaging dedicated servers, because once again that’s not going to be there either. You can just yank the code out of the engine’s UE4Server.Target.cs file. Just make sure you change all instances of the names inside and out these files to match your project name.

I know there are some wizards out there on this that are quietly hiding in the darkness.

I hope this helps!

Thank you so much for the detailed response! I had pretty much the same issue as you - I had some plugins that really didn’t need to be in the project - once had moved them to the engine rebuilding became much less of an issue. Even hot-reloaded c++ started working (although it’s limitations became clear pretty quickly!)

1 Like