Hi,
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.
Hi,
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.
Hi!
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.
OldName
project folder. Rename the duplicate folder to NewName
.NewName
folder.OldName.uproject
to NewName.uproject
.NewName.uproject
in a text editor, and replace all instances of OldName
with NewName
. Save and close the file.OldName.png
thumbnail, rename it to NewName.png
.Source
folder.OldName.Target.cs
to NewName.Target.cs
.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.OldNameEditor.Target.cs
(renaming it to NewNameEditor.Target.cs
.OldName
folder to NewName
as well.NewName
folder.OldName.Build.cs
to NewName.Build.cs
.NewName.Build.cs
. Find all instances of OldName
in this file with NewName
. Save and close the file.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).NewName.sln
.OldName.cpp
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, OldName, "OldName" );
to IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, NewName, "NewName" );
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
.DefaultEngine.ini
(under an existing or new [/Script/Engine.Engine]
header):
+ActiveGameNameRedirects=(OldGameName="/Script/OldName", NewGameName="/Script/NewName")
OLDNAME_API
in your project’s header files, change those instances to NEWNAME_API
.Saved
and Intermediate
folders in your project directory.Again, please let us know if any issues come up with these renaming steps. Thanks!
Hi,
We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.
Thanks!
Sure, go ahead.