So far I’ve been able to run GenerateProjectFiles.bat from within the UnrealEngine source folder. If I copy a project into the UnrealEngine folder and run GenerateProjectFiles.bat it adds the project to the UE4.sln. However when I try to run the game after setting it as the startup project it says
Failed to open descriptor file ‘…/…/…/UE4.uproject’ or something along those lines.
If I do the same for ShooterGame however, it runs just fine. It’s only on my newly made FirstPersonShooter base game that it fails.
I’ve only been able to run my game from within Visual Studio if it’s the solution generated for me by the editor initially.
I haven’t found a way to regenerate this solution later though. I imagine it uses GenerateProjectFiles.bat but specifies that the home directory is outside of UnrealEngine somehow, which isn’t documented.
I managed to actually get this working as well but I was wondering what the %~dp0 means.
I had to write in absolute paths because for some reason the tool didn’t recognize any combinations of relative paths.
I don’t keep my game inside the engine source directory because the Windows Github app gets slowed down to a crawl. It thinks I want to include my entire game source code as a commit, and tracking that seems to slow it down. I also want to avoid editing the .ignore file so it stops bugging me about comitting the .ignore file.
There’s no reason relative paths shouldn’t work for what you’re doing. Personally I never put the game in the engine folder, I made a special folder in the root of one of my data drives, one is for the engine source, the other is for projects. That way I can copy my .bat to each of my projects, and all I have to do is change the name to match the .uproject file.