It usually happens when someone removes or renames C++ class. There’s no functionality in editor or VS to fix it or even warn about the error.
You end up with blueprint file that cannot be opened. And “Reparent Blueprint” function is available only if you open this Blueprint…
You’re forced to revert your work in order to fix this issue. Even worse if someone’s not using version control…
So we need one of these solutions:
A) Add “Reparent blueprint” to context menu of blueprint file. That would be probably the easiest solution.
2) Allow to open blueprint without valid parent so developer could use existing “Reparent blueprint” button. And that could require a lot of work - well, I’m perfectly happy with solution above
I think even in your case you could use redirectors to fix missing/moved classes as long as the NativeParentClass is not none - it should be the old class as long as it hasn’t been opened and saved with missing class. There are redirectors for renaming functions, structs, enums and more.
Open ProjectName\Config\DefaultEngine.ini
In [/Script/Engine.Engine] section add:
+ActiveClassRedirects=(OldClassName=“OldName”,NewClassName="/Script/YourProjectName.BetterNewName")
Open each BP, compile, & save.
The ActiveClassRedirects line can now be removed from DefaultEngine.ini (although it seems most people don’t bother since you could have missed stuff?)
Notes:
Redirect will be applied when opening uasset blueprint, not when only launching the editor.
NativeParentClass can be seen as a column when view options view type is set to Columns in the content browser
/Script/YourProjectName is probably unnecessary unless the blueprint is migrated from another project?
You can see other example redirects in Install path \Epic Games\UE_4.17\Engine\Config\BaseEngine.ini
If there is a better way to do this right now than actually opening changed BPs - I’m all ears