How to rename your UE5 c++ project, the (relatively) easy way

This worked for me:

  1. Make a backup!
  2. Delete all the generated files:
    Folders: Binaries, Build, DerivedDataCache, Intermediate, Saved, .vs
    Files: *.sln
  3. 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
  4. 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.
  5. In Config/DefaultEngine.ini, add these redirects under [/Script/Engine.Engine]:
    +ActiveGameNameRedirects=(OldGameName=“OldName”,NewGameName=“/Script/NewName”)
    +ActiveGameNameRedirects=(OldGameName=“/Script/OldName”,NewGameName=“/Script/NewName”)
  6. Generate Visual Studio project files, open the sln, and build
  7. 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.

UE5rename

4 Likes