Core Redirects should go into DefaultEngine.ini
. Create a section called [CoreRedirects]
if it doesn’t exist.
How to redirect a BP interface to a C++ interface:
Use a ClassRedirect with the following settings:
- OldName should be the name of the BP interface with
_C
suffix - NewName should be the C++ class with
/Script/ProjectName.InterfaceClassName
- Important: Do not use the I-prefix used in the C++ class
- OverrideClassName should be
/Script/CoreUObject.Class
For example:
+ClassRedirects=(OldName="BPI_MyInterface_C",NewName="/Script/MyProject.MyInterface", OverrideClassName="/Script/CoreUObject.Class")
Redirect BP enumerator to a C++ enum
When redirectin BP enums, you will need to manually specify the new mapping of enum values. BP enum values will be called NewEnumerator0
, NewEnumerator1
and so forth. Gotcha: The numbers in the value names might not be in same order as the values are in the editor. Be sure to check the correct mappings happen when starting the project. (It seems they might be in creation-order, if you later added and reordered values)
+EnumRedirects=(OldName="BlueprintEnumName",NewName="/Script/ProjectName.ECppEnumName",OverrideClassName="/Script/CoreUObject.Enum",ValueChanges=(("NewEnumerator0","ECppEnumName::Foo"),("NewEnumerator1","ECppEnumName::Bar"),("NewEnumerator2","ECppEnumName::Quux")))
Maybe how to determine the NewEnumerator name:
rhubarb:_ So apparently if you convert the enum to a string you get the name you chose, but if you get the name and convert that to a string you get the internal one.
(Untested, this person suggested this on Unreal Source Discord)