Here’s how to rename a plugin, a module or move content and classes between two plugins without breaking your blueprints in unreal engine.
I usually write down anything that i spend more than 15 minutes trying to figure out. For this case i spent about an hour and almost rewrote my blueprints from scratch. I’m going to keep this short but it should help.
1. Move your content to the New Plugin
If you’re merging two plugins , you’ll want to move the content from the old/source plugin to the new/target plugin in the editor first. This is the easy way of doing this.
If you’re writing a script and automating this process, you can move the files and add CoreRedirect. More on this in the example config file below but it’s basically
+PackageRedirects=(OldName=”/OldPlugin/”, NewName=”/NewPlugin/”, MatchSubstring=true).
2. Moving classes structs and enums between modules(plugins).
This part is very important if you don’t want to break your blueprints.
In your new / target plugin’s “Config” folder… create/edit a file called “PluginName.ini”… eg if your plugin is called “CoolPlugin” you’ll want to edit/create “CoolPlugin.ini”.
Then you’ll you’ll want to add [CoreRedirects] defining what changed and where to find it now.
Example file:
[CoreRedirects]
+PackageRedirects=(OldName="/MidiEngineRhythmTools/", NewName="/MidiEngine/", MatchSubstring=true)
+ClassRedirects=(OldName="RhythmJudgementBox",NewName="/Script/AxMidiEngineCore.RhythmJudgementBox")
+ClassRedirects=(OldName="RhythmSectionComponent",NewName="/Script/AxMidiEngineCore.RhythmSectionComponent")
+ClassRedirects=(OldName="RhythmInputInterface",NewName="/Script/AxMidiEngineCore.RhythmInputInterface")
+ClassRedirects=(OldName="RhythmSectionInterface",NewName="/Script/AxMidiEngineCore.RhythmSectionInterface")
This is the core redirects i added when merging the MidiEngine Rhythm tools plugin into the Main MidiEngine Plugin.
You can see that “NewName” for ClassRedirects includes the new Module Name, “AxMidiEngineCore” in its path.
Here is a link to read more on redirects: CORE REDIRECTS IN UNREAL ENGINE
3. Save the Assets.
In order to remove the Redirects in the config file, we need to save each asset that relies on the redirect. The “Save All” menu entry won’t work. You need to manually open each asset / select and right click then Save.
When you do that, the asset will work without the [CoreRedirects] and you can now safely remove them.