Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Renaming a C++ project


Could you please provide a step-by-step guide on how to rename a C++ project? I've searched everywhere, the only available info is how to rename a Blueprints-only project.

Product Version: Not Selected
more ▼

asked Jun 14 '15 at 06:34 PM in C++ Programming

avatar image

Answers.Archive STAFF
1.9k 197 306 677

avatar image Answers.Archive STAFF Jun 14 '15 at 06:34 PM +

Sure, go ahead.

show all comments (comments are locked)
10|2000 characters needed characters left

The question has been closed Jun 14 '15 at 06:35 PM by Ben Halliday for the following reason:

The question is answered, right answer was accepted

1 answer: sort voted first


Thanks for your patience - I wanted to check with an engineer and also run through these steps for renaming a C++ project. There may be some additional steps needed depending on the original project setup and the version you are on, so please let us know if you encounter any issues following these steps (or if you need additional steps for Mac).

This example is for creating a copy of OldName called NewName. I'd recommend doing this as a duplication process if at all possible, in case there are issues during the rename.

  1. Duplicate the OldName project folder. Rename the duplicate folder to NewName.

  2. Open the NewName folder.

  3. Rename OldName.uproject to NewName.uproject.

  4. Open NewName.uproject in a text editor, and replace all instances of OldName with NewName. Save and close the file.

  5. If you have an OldName.png thumbnail, rename it to NewName.png.

  6. Open the Source folder.

  7. Rename OldName.Target.cs to NewName.Target.cs.

  8. Open NewName.Target.cs. Find all instances of OldName in this file with NewName. There may be some partial word matches. Save and close the file.

  9. Repeat step 7 and 8 for OldNameEditor.Target.cs (renaming it to NewNameEditor.Target.cs.

  10. Rename this OldName folder to NewName as well.

  11. Open the NewName folder.

  12. Rename OldName.Build.cs to NewName.Build.cs.

  13. Open NewName.Build.cs. Find all instances of OldName in this file with NewName. Save and close the file.

  14. Go back to the main project folder, and right-click on the NewName.uproject file. Select Generate Visual Studio Project files. (If you don't have this option, run Engine/Binaries/Win64/UnrealVersionSelector-Win64-Shipping.exe once).

  15. Open NewName.sln.

  16. Open OldName.cpp

  17. Change IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, OldName, "OldName" ); to IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, NewName, "NewName" );

  18. Open the Config folder, and check all the configuration files for OldName references to change to NewName. For example, change GlobalDefaultGameMode=/Script/OldName.OldNameGameMode to GlobalDefaultGameMode=/Script/NewName.OldNameGameMode.

  19. Add the following to DefaultEngine.ini (under an existing or new [/Script/Engine.Engine] header):

    +ActiveGameNameRedirects=(OldGameName="/Script/OldName", NewGameName="/Script/NewName")

  20. If you have any OLDNAME_API in your project's header files, change those instances to NEWNAME_API.

  21. Delete Saved and Intermediate folders in your project directory.

  22. Compile, and your project should now open without errors.

Again, please let us know if any issues come up with these renaming steps. Thanks!

more ▼

answered Jun 14 '15 at 06:34 PM

avatar image

Answers.Archive STAFF
1.9k 197 306 677

(comments are locked)
10|2000 characters needed characters left

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question