Nothing in my project is explicitly tied to any specific folder path.
All the dependent stuff is all in the one and same folder.
It has c++ files…the includes are only for the standard Unreal includes…
Which are of course in the same place as before in the Unreal folders.
But when I move the project I get all sorts of compile errors…
If I try to build the c++ stuff in my original file location I get no errors.
Now when I moved the project directory…I did not modify anything…all I did was move the folder.
So both projects, the original one in the original file location and the same on in a different file location don’t compile the same…the original compiles fine, the other one does not.
Again, both projects and c++ are exactly the same and nothing is modified.
So what do I do? Is there a proper method to do this?
Regenerate the project files by first deleting the .vs, Intermediate, Binaries, Saved folders and the .sln file, then right click on the .uproject file, and under more options click on the Generate Project Files option.
If that doesn’t fix the issue, there’s a longer way that ensures it: Delete the .vs folder, Source folder and the .sln file, open up the .uproject file, inside the editor, navigate to the Tools menu and create a new C++ class, make it public, then close the editor and head back to your project folder, open up the newly generated Source folder, then into the folder with your project name, and under there you should see two folders named Public & Private. Go ahead and replace them with the original ones, and you should be able to build the project with no issues!
Disclaimer: Make sure to have a backup of your project before manually adjusting the project files!!!