Unreal Engine may sometimes show this error when opening a Widget Blueprint:
Widget Blueprint could not be loaded because it derives from an invalid class.
Check to make sure the parent class for this blueprint hasn't been removed!This usually means the Blueprint is still trying to inherit from a class that Unreal can no longer find.
What causes this error?
The most common cause is renaming a C++ class without adding a Core Redirect.
However, this is not limited to simple class renames. Moving a class to another module can cause the same issue, because the full Unreal class path changes.
This can happen when:
- A C++ class is renamed.
- A class is moved to another module.
- A class is moved from project code into a plugin.
- A class is moved between plugin modules.
- A plugin or module is renamed.
For a visual example, watch the video on this page.
Symptoms
You may see the popup when opening a Widget Blueprint:
Widget Blueprint could not be loaded because it derives from an invalid class.
Check to make sure the parent class for this blueprint hasn't been removed!Other symptoms may include:
- The Widget Blueprint will not open.
- The parent class shows as invalid.
- The Blueprint cannot compile.
- Other dependent Blueprints may also fail to load.
- Packaging or cooking may fail because Unreal cannot resolve the missing class.
How to fix it
To fix the issue, you need to add a Core Redirect.
A Core Redirect tells Unreal:
When something asks for the old class, use the new class instead.The fix has two parts:
- Find the old class name.
- Redirect it to the new class name.
Step 1: Identify the old class name
Right after the popup appears, open the Output Log.
In Unreal Engine, go to:
Window > Output LogSearch for the name of the broken Blueprint.
You can follow what happens in the video if it makes it easier for you but
You are looking for a message similar to this:
CreateExport: Failed to load Class X as Parent X here is the class name Unreal is still trying to load from the Blueprint asset.
Watch the video for the exact Output Log search process. It will make it easier.
Step 2: Identify the new class name
Next, identify the class that should replace the old one.
Usually, this is the class you renamed or moved the old class into.
For native C++ classes, the reflected Unreal class path usually looks like this:
/Script/ModuleName.ClassNameDo not include the C++ prefix unless it is actually part of the reflected name.
For example, a C++ class named:
UAxGridChildWidgetis usually referenced by Unreal as:
AxGridChildWidgetnot:
UAxGridChildWidget Step 3: Choose The File To Add Core Redirect in
The CoreRedirects we’re talking about are added in Configuration files ending in .ini extension.
This file is located :
At the project level, The redirect is added in:
Config/DefaultEngine.iniIf the class belongs to a plugin, you can place the redirect in the plugin config file.
For a plugin, create an .ini file that matches the default plugin config name, for example:
Plugins/YourPlugin/Config/DefaultYourPlugin.iniThen add the following redirect:
Step 3: Add The redirect in the config file
Use this format:
[CoreRedirects]
+ClassRedirects=(OldName="OldName",NewName="/Script/NewModule.NewName")For the Output Log example above, the redirect would look like this:
[CoreRedirects]
+ClassRedirects=(OldName="/Script/EnhancedUIGrids.AxLineGridChildWidget",NewName="/Script/EnhancedUIGrids.AxGridChildWidget")
Final steps
After adding the redirect:
- Restart Unreal Engine.
- Open the broken Blueprint.
- Compile it.
- Save it.
- Check the Output Log again for any additional missing classes.
Sometimes one broken Blueprint may reference multiple renamed or moved classes. Fix the first missing class, restart, then repeat the process if another missing class appears.
Related tutorial
For more information about Core Redirects and moving Unreal Engine content or classes, see this related tutorial: