Every once in a while I want to rename C++ member variable that has been used in a blueprint as UPROPERTY()
Is there a way to perform this automagically (something like ActiveClassRedirects or ActiveStructRedirects in DefaultEngine.ini) that wouldn’t require manually replacing old name with new on all blueprints that use it?
well it may also mean that your design could need a maintainance.
Of course every one will, once in a while, rethink about given member or function names. Doing a renaming can mean much todo`s in other departments.
So writing code also mean to prevent the workload which comes on changes too.
In your case, you have a member variable and expose it in Blueprint.
So renaming it will cause some work in your blueprints as well.
Usually a class should hide its members and provide getter and setter for a member. So instead of exposing your member for blueprint usage (which is often not a good idea) provide UFunctions called “GetMyMember()” or “SetMyMember(Value)”.
So in the end it is not necessary to have what you desire.
If you look in BaseEngine.ini you’ll see a bunch of uses of K2FieldRedirects. Seems to be used in a few different ways, but the following looks like a simple renaming of a function within a class:
Just wanted to update this for anyone coming across this thread in recent years. The unreal documentation has slightly different naming for C++ property redirects now. It’s still in the same .ini files mentioned above, but the naming is a bit different. You can even redirect a property across actors(!)