I have tried both GitHub and Plastic SCM. Whenever I set up version control on a project with C++ files, my collaborators can’t open it. They always get an error saying that it’s missing modules. The weird thing is that the C++ files are in the source folder, so they are being shared, but UE5 acts like they aren’t there. What do I do?
Is the problem that the built module isn’t available, so the project fails to load the DLL?
If so, they’ll need to open the solution and build locally, before opening the project.
(And if your collaborators are artists, consider checking in the built modules, or auto-building some install they can sync from.)
I don’t know how to check in a built module. I don’t know what that means. They aren’t able to open the solution and build from there though. That’s what’s weird. The solution is empty, or it shows the module but says “not found” next to them. Also, what’s a DLL?
EDIT: I have come across a couple things saying “Unreal does not manage C++ source code,” but I don’t know what to do with that information
I’m assuming you’re on Windows, if you’re on Mac or Linux, you’ll have shared objects named something other than DLL.
Again, assuming windows: If the solution doesn’t work, then you should be able to right-click the project file in explorer folder view, and select “re-generate visual studio projects” and it should work.
If it doesn’t work, then perhaps you’re checking out into a different file path, and there’s an absolute rather than relative path somewhere in the setup? Also, UE5 uses really long file paths internally, so I recommend keeping your checkouts in a folder that’s in the root; something like D:\UE5\Projects\...
Also, try making sure that your project name and path doesn’t have spaces in it (where each person checks out.) Not sure that that matters here, but worth a check.
Finally, make sure everyone has the same version of unreal engine installed.
I’m on Windows. regenerating doesn’t work and we’re all on the same version. The file path is where I saved my project. That’s where it has to be, right? I have a folder on my hard drive called Unreal Projects and there’s a folder in there for my project. That’s the path. That’s where everything is saved, so would moving the whole folder somewhere else fix it?
If it’s just a project, not a full engine build, then the default location should work.
However, if there are absolute paths in any configuration, then that won’t work for other people.
If right-clicking in the explorer and re-generating projects doesn’t work, then does it print an error message? If so, what is that error message?
Have the other people previously been able to build projects?
Is this the first time they’re trying this specific project?
Other than that, I don’t think there’s an obvious solution here, other than carefully reading the error messages and following up on what they suggest is the problem.
This is the file path:
D:\Unreal Projects\PlasticTest
Is that an absolute path? I don’t know the different types of paths. What other path could there be?
EDIT: I just went back and looked at several tutorials and they use absolute paths (usually C:\Users\Username\Desktop or something like that)
Okay guys, I’ve cracked it!
The problem stems from the ignore file Unreal generates: it ignores a really important folder called the Binaries folder! So, for anyone who has this problem in the future, Here are the steps to successfully set up a repository:
-
Create a folder for your repository.
-
Inside the repository folder, create a new text document. Rename it .gitignore (ignore.conf for Plastic SCM). You may get a warning about changing file extensions. Ignore that warning.
-
Inside the ignore file, paste the following:
.vs/* .idea/* .git/* .sln/* Build/* DerivedDataCache/* Intermediate/* Plugins/*/Intermediate/* Saved/*
-
In the GitHub Desktop App, create a new repository. Give it the same name as the repository folder you created earlier, and set its path to the folder the repository folder is inside of.
-
Publish the repository.
-
Move the project files into the repository folder.
-
Commit the changes.
-
On the GitHub website, go into Settings>Collaborators and add any team members you need.
-
Each team member will need to accept the invite. Then, on the Desktop app, they will hit File>Clone Repository. They can set whatever local path they want.