When I change a class name, add core redirect, then do update redirector references to update the binaries of the referenced and inherited BPs, then delete the core redirects because I do not want to commit it to version control. The inherited BPs are loaded correctly after deleting core redirects, but if this renamed class is used as a data type for some variable or in a cast node in some event graph of a BP, then they do not compile properly after deleting the core redirects. Do I have to fix all compile errors manually for this?
Hello!
First of all, why do you want to delete the core redirects and not commit them to version control? It’s not an issue to have a lot of core redirects configured, even with very old stuff. It scales well and does not impact runtime performance in any meaningful way, not even editor performance. There is really no reason to try to delete core redirects, best practice is to keep them there. Even having a couple hundred of them should be fine.
Having said that, If you want to delete a core redirect, you’d have to look for all the places where the class is being used (you should be able to do this by doing “Find Usages” from the IDE) and recompile these Blueprints first before deleting the core redirect.
The Blueprints serialize the name of the functions and classes they use, so if you don’t recompile, the old name is stored inside them. As soon as you recompile them, they refresh old names with new ones in redirects. So if you recompile all the blueprints using this class, you should be safe to then delete the core redirect for that class.
Again, the best practice is to just not worry about this at all and just keep the core redirects there and commit them.