This worked for me:
- Make a backup!
- Delete all the generated files:
Folders: Binaries, Build, DerivedDataCache, Intermediate, Saved, .vs
Files: *.sln - Use Visual Studio (without code) for global find and replace in project (Match case, all File Types):
Replace All OldName with NewName
Replace All OLDNAME with NEWNAME - In explorer, search for OldName in project root folder.
Replace OldName with NewName in filenames, and then folder names.
Then rename the root folder from OldName to NewName. - In Config/DefaultEngine.ini, add these redirects under [/Script/Engine.Engine]:
+ActiveGameNameRedirects=(OldGameName=“OldName”,NewGameName=“/Script/NewName”)
+ActiveGameNameRedirects=(OldGameName=“/Script/OldName”,NewGameName=“/Script/NewName”) - Generate Visual Studio project files, open the sln, and build
- Open the uproject. It should have no errors.
Using search functions made the renaming easy.
The tricky part was step 5, which fixes asset issues.