Downloaded engine built by other team member, but the engine compiles again when compiling game project

I downloaded (from Perforce) an engine built by other team member, and I tried to open our C++ game project by it.

When first time opening the project, I have the same “EngineAssociation GUID” problem like here, so I do a “Convert in Place” for my project. However, this action triggers the game project to be re-compiled, which further triggers the engine to be re-compiled. Furthermore, I tried to create a new C++ project, and the engine still compiles when I build this new C++ project.

This behavior is not desired, the built engine should be directly usable by all team members. So, how do I stop this re-compile? Thanks.

Hello marsonmao,

When your team member built the engine and shared it, did he also build the project in this newly built engine and share that via Perforce as well? As far as the engine trying to rebuild when you build the C++ project, this is going to happen in most cases, unless you sync the entire engine, including every file, the VS solution won’t know that it has already been built.

The ideal way to do this would be to have that one team member build the engine, use that built engine to build the project, upload the engine and the project, and then work off of it this way.

In this case, if changes are made to the project on your computer that require you to compile the project, the engine will need to be recompiled once, but should never need it again. If the engine ends up being changed, it will require another recompile after syncing those changes if you wish to compile the project again.

Thank you thank you ! I’m so desperately looking for an answer!

The ideal way to do this would be to have that one team member build the engine, use that built engine to build the project, upload the engine and the project

Yes, the one who built the engine also did building the game project. By the way, we are building 4.11 preview 4, so the game project conversion mentioned in step 4 is from 4.10 to 4.11.p4.
The steps for building engine and game project are:

  1. Build UE4 with Development Editor + Win64
  2. Build ShaderCompileWorker with Development Editor + Win64
  3. Build UnrealFrontend with Development Editor + Win64
  4. Open the built editor, open my game project, where there is a convert in place
  5. The game project is opened, refresh Visual Studio project and open it
  6. Build MyGame with Development Editor + Win64
  7. Upload the directories below

These are the directories uploaded to Perforce (Engine and MyGame):

81346-p4_directories.png

81347-mygame_directories.png

Note that /Plugins includes all /Binaries inside it.

unless you sync the entire engine, including every file

According to the above images, did I upload enough files?

In this case, if changes are made to the project on your computer that require you to compile the project, the engine will need to be recompiled once, but should never need it again.

Did you mean that, in an ideal case, the one who downloads the built engine need not to recompile engine, until some changes are made to the game project? Actually, we have successfully done an ideal case. Our 4.10 build (engine + game) is done in one machine, all team members can download it and open the game without recompile. If anyone modify the game C++ source and build the game, the engine won’t recompile, too. However this time we failed, the 4.11 build just can’t stop recompiling.

Hi ,
If you need any further information, or you got anything for me to check on my computer, please tell me, thanks!

Thank you for the detailed response. I’ll be sure to let you know if I need any more information from you but in the meantime I’ll be testing this myself to just to ensure that I don’t get the same behavior. If I do, I’ll look into how to fix it.

Ok , thank you!

Hi , got any news? Thanks :stuck_out_tongue:

Unfortunately not yet. I was running into some issues with the build I was trying to upload to perforce for testing that had to get fixed first which caused some complications. I have another build uploading now so I should get to it soon.

Ok great, I’ll wait for you then, thanks!

I don’t seem to have any problems with this workflow. To be exact, this is what I did:

  1. Downloaded the engine from github, extracted it, ran setup.bat, ran generateprojectfiles.bat and built the engine
  2. Added a workspace to Perforce to include the directory for the engine
  3. Right-clicked the main folder (one up from the directory with Engine, Feature Packs, Samples, etc) and selected “for Add”
  4. It had some issues adding a few files due to them having Wildcards in their names, but they were unimportant files.
  5. Submitted the changelist that added all of the files
  6. I then opened the engine and created a new project with its base directory at the same level as the engine, so the top folder for the project was in the same directory as the .sln for the engine
  7. I added this project to perforce as I did with the engine
  8. Another team member synced to this directory to grab the engine and the project
  9. The team member opened the editor once so that the UnrealVersionSelector would register it as an editor that is located on that computer. He closed it as soon as the Unreal Project Browser came up.
  10. The team member then double clicked the .uproject file and it began opening in the newly downloaded editor without any selections being made.

I have a feeling that the step that was missed may of been step 9 but I’m also not sure how pivotal that step is. I know it’s needed if you’re looking to convert the project from a previous version but I’m not sure about when the project is already suppose to be associated.

Thank you for the super detailed answer! I’d like to make sure several points:

  1. In step 3, did you submit the entire Engine directory? Including Intermediate and Saved, etc?

  2. In step 6, is it necessary that to put the game project top level at the same level of Engine directory (also the same level of engine’s .sln)? (The result is Engine, FeaturePacks (etc), engine’s .sln and MyGame are in the same level, right?)

  3. In step 6, what type of project you have created? In my case only C++ game project causes this recompile issue. Blueprint project is fine.

  4. In step 10, the team member does not encounter the project conversion? His editor’s GUID (which is generated in step 9) should be different with yours (which you submitted to Perforce) so there should be a conversion message box pop up. I think the conversion is due to different GUID, since game project’s association is depending on this GUID but not engine version, as you can see it inside the .uproject file.

I did some additional testing to get the answers for these questions for you.

  1. Yes, I submitted every file that was available. I had to multiple files, some in binary, intermediates, and source, as writable to allow for compiling projects afterwards.
  2. I tested this with 4 different projects, one blueprint and one code inside of the directory, and a blueprint and a code outside of the directory. It seems that the code project requires being in the same directory to stay associated while the blueprint projects do not. This may have something to do with UBT generating the project files in such a way so that the .sln for the code project isn’t actually made if it’s in the directory, rather the project’s module is added to the UE4.sln.
  3. I had originally only used a blueprint project, but my previous answer covers both types
  4. My team member didn’t encounter any conversion messages until he attempted to open the code project that was located outside of the same directory as the editor.
  1. Wow that’s big news, since I’m following this official documentation to manage my Perforce files: [here][1]. Please check the figure above title “Adding Files to Perforce”. But I also submit files in Build/ since it is included in the GitHub source code.
  2. Ok then I’ll try to put my game code project next to Engine/ folder.
  3. Ok
  4. What do you mean by “located outside of the same directory as the editor”? Do you mean that the code project top level folder is next to Engine/ folder? I believe it is correct that the conversion happens when you open the code project. When the team member try to double click, or select .uproject file using project browser, he should see this message box below, since the GUID written in the submitted.uproject is not the same as the GUID generated by his computer.

83443-convert_project.png

In response to your reference to the documentation, please note that it is speaking of a project, and not an engine version. You have the option to not include all of the files that I did, especially outside of your initial commit, but as soon as a user who pulled down the engine attempts to compile a code project that is associated with that version, it will begin building the entire engine as well due to the compiler seeing it as necessary due to not having all of the files.

As for what I meant by “located outside of the same directory as the editor”, here is a visual example.

83471-enginetest+projects.png

This first image shows two projects, CodeTestProj and TestProj which are both in the same directory as the editor. Neither of these projects prompted the newly synced user to convert the project or select an engine version.

83472-externalcodeproj.png

This image is from one folder up in Windows Explorer. EngineTest is the file directory being shown in the first image. ExternalCodeProj, which is located here, did prompt the user to select an engine version.

Ok, that’s very clear, I will test the steps you provide and report the result, but will not be very soon since I’m working hard for the next milestone. Thanks!!

Ah, one more question, I still can’t figure out why my 4.10 build does not require users to recompile. Please note that my 4.10 build did not submit all the files to perforce, I did’t include Intermediate and all other temp folders. Could you help me to verify the reason of this?Thanks!

Thats fairly perplexing. When you say “4.10 build” you’re referring to the editor source build itself correct? When it doesn’t “require users to recompile”, are they attempting to compile a project or the editor itself? Was the project included in this sync where they synced the engine? Was the project originally compiled with that engine? Are they even being prompted to compile the project or is no compiling even occurring?

Sorry for my bad wordings, here’s what I mean: the 4.10 build is the editor source build, and I put it on Perforce. I also put the game project (originally compiled by it) on Perforce. My team member downloaded both of them. My team member opened the game project, and there’s a message box said he must convert the project (the image I attached above). The message box said it would rebuild the project but there’s none. So the team member is prompted to compile but the compile didn’t happen. However with the 4.11 build, the steps are all the same, but the 4.11 build does trigger the recompile of both game project and the editor.

Is the team member also getting the source code for the project itself? Since you’re getting that window in particular, I’m assuming that you’re running UE4Editor.exe and then, via the project browser, you’re opening the project from there. If you instead (before doing any conversion) double click the .uproject instead, are you still prompted to convert? When you do so, is a Visual Studio project (.sln) generated for you? If so, the .sln would need to be opened directly and then compiled to be able to open the project, as it has been converted and the current binaries aren’t viable anymore. If you do need to compile in this case, I would suggest right-clicking the project in the solution explorer and selecting Build from there rather than using the general build command from the toolbar, as the default project may be set to UE4. The goal here is that only the project would be compiled and not the editor, but that is something you’ll need to test.

Hello marsonmao, have you had a chance to look over my previous comment?