When I update a project to a more recent engine version, I always end up having a massive number of ActiveClassRedirects in DefaultEngine file. They look like this:
-ActiveClassRedirects=(OldClassName="SoundMode",NewClassName="SoundMix") +ActiveClassRedirects=(ObjectName=,OldClassName="CylinderComponent",NewClassName="CapsuleComponent",OldSubobjName=,NewSubobjName=,InstanceOnly=False) +ActiveClassRedirects=(ObjectName=,OldClassName="EternalHillCharacter",NewClassName="EternalCharacter",OldSubobjName=,NewSubobjName=,InstanceOnly=False)
There are redirects left for quite a few things: classes (both in-game and engine), blueprints, components… If you happened to rename any game class at some point, it will leave the old name as a redirect. So, after all these updates, my DefaultEngine.ini is now >100Kb. This also happens when you move or rename assets, as it seems, so these changes show up in DefaultEngine.ini, too.
Moving/renaming assets is even worse because it leaves a redirector in place of the old file, and FixupRedirects for some reason does not work for me at all (on 4.6). This is counterintuitive and sometimes messes with source control. I feel that it is the intended behavior (forum question), but why go for such a kludge if you can get away without it?
In fact, I was so concerned with renamed asset files staying in the original location as redirectors that I hacked the engine to completely disable asset redirections:
//AssetRenameManager.cpp:601 //was const bool bLeaveRedirector = RenameData.bCreateRedirector; const bool bLeaveRedirector = false;
The editor can recognize asset references and does a good job of propagating asset renames to depending blueprints with this modified engine. While I can agree that the default behavior is kind of failsafe, it seems that the editor is lacking the “redundant redirect removal” counterpart.
Is there any way to link all game assets to their new base class location and completely erase all references to the old class name? I never use hardcoded references in the code, so renaming an asset does not affect it.
This is a bit of a purist question, because everything works as it is now, but leaving class redirects just feels like a rather ugly solution.