Blueprint Keeps Losing Parent

So I have a character with C++ with a child BP class of it, and it has happened 3 times now I boot up my project and it no longer has a parent class and if I attempt to open it I get “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! Do you want to continue (it can crash the editor)?”

and I get these loading errors when I load up the project from the BP and the animBP for it.
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘AnimGraph’: AnimBlueprintGeneratedClass /Game/Game/Character/ShooterAnimBP.ShooterAnimBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘BlueprintUpdateAnimation’: AnimBlueprintGeneratedClass /Game/Game/Character/ShooterAnimBP.ShooterAnimBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘EvaluateGraphExposedInputs_ExecuteUbergraph_ShooterAnimBP_AnimGraphNode_TransitionResult_5F1485254F15F92BB6EDC0B34D51C47A’: AnimBlueprintGeneratedClass /Game/Game/Character/ShooterAnimBP.ShooterAnimBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘EvaluateGraphExposedInputs_ExecuteUbergraph_ShooterAnimBP_AnimGraphNode_TransitionResult_DF50AF074E9C464C74EF5B8791EB0FF6’: AnimBlueprintGeneratedClass /Game/Game/Character/ShooterAnimBP.ShooterAnimBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘ExecuteUbergraph_ShooterAnimBP’: AnimBlueprintGeneratedClass /Game/Game/Character/ShooterAnimBP.ShooterAnimBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘AnimBlueprintGeneratedConstantData’: AnimBlueprintGeneratedClass /Game/Game/Character/ShooterAnimBP.ShooterAnimBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘Arrow’: ShooterCharacterBP_C /Game/Game/Character/ShooterCharacterBP.Default__ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘FollowCamera’: ShooterCharacterBP_C /Game/Game/Character/ShooterCharacterBP.Default__ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘CollisionCylinder’: ShooterCharacterBP_C /Game/Game/Character/ShooterCharacterBP.Default__ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘CharMoveComp’: ShooterCharacterBP_C /Game/Game/Character/ShooterCharacterBP.Default__ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘DefaultSceneRoot_GEN_VARIABLE’: BlueprintGeneratedClass /Game/Game/Character/ShooterCharacterBP.ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘SimpleConstructionScript_0’: BlueprintGeneratedClass /Game/Game/Character/ShooterCharacterBP.ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘SCS_Node_0’: SimpleConstructionScript /Game/Game/Character/ShooterCharacterBP.ShooterCharacterBP_C:SimpleConstructionScript_0
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘CharacterMesh0’: ShooterCharacterBP_C /Game/Game/Character/ShooterCharacterBP.Default__ShooterCharacterBP_C
LoadErrors: Warning: CreateExport: Failed to load Outer for resource ‘CameraBoom’: ShooterCharacterBP_C /Game/Game/Character/ShooterCharacterBP.Default__ShooterCharacterBP_C

Why does this keep happening? Yes I can fix it by deleting it and redoing it all over again, but I shouldn’t have to, what is causing this to happen?

6 Likes

This happens when you rename the parent class in c++ but do not implement a Core Redirector to notify the blueprint system of the changes.

You can also set the parent class manually from the Blueprint tab, however, if this is not accessible there is a nice tool on GitHub which you can use.

2 Likes

But I have not renamed the parent class. This just happens randomly when I boot up my project. My parent class has not change names 1 time since I created the project

3 Likes

That is very odd, in all the time I have worked with UE I have not run into this, but I see you are using UE5 and I am still on UE4. Are you using any plugins that can cause a conflict?

You might have to dig into c++ by setting breakpoints, try this file:

\UE_4.26\Engine\Source\Developer\AssetTools\Private\AssetTypeActions\AssetTypeActions_Blueprint.cpp

void FAssetTypeActions_Blueprint::OpenAssetEditor( const TArray<UObject*>& InObjects, TSharedPtr<IToolkitHost> EditWithinLevelEditor )
{
	EToolkitMode::Type Mode = EditWithinLevelEditor.IsValid() ? EToolkitMode::WorldCentric : EToolkitMode::Standalone;

	for (UObject* Object : InObjects)
	{
		if (UBlueprint* Blueprint = Cast<UBlueprint>(Object))
		{
			bool bLetOpen = true;
			if (!Blueprint->SkeletonGeneratedClass || !Blueprint->GeneratedClass)
			{
				bLetOpen = EAppReturnType::Yes == FMessageDialog::Open(EAppMsgType::YesNo, LOCTEXT("FailedToLoadBlueprintWithContinue", "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! Do you want to continue (it can crash the editor)?"));
			}
			if (bLetOpen)
			{
				FBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
				TSharedRef< IBlueprintEditor > NewKismetEditor = BlueprintEditorModule.CreateBlueprintEditor(Mode, EditWithinLevelEditor, Blueprint, ShouldUseDataOnlyEditor(Blueprint));
			}
		}
		else
		{
			FMessageDialog::Open( EAppMsgType::Ok, LOCTEXT("FailedToLoadBlueprint", "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!"));
		}
	}
}

I found the problem, don’t know if this is specific to UE5 my C++ class was not even in my content browser even though it was untouched. It seems to have a problem with having the C++ file in the content directory. when I first load up the project it is not there, until I compile the project, but when I made this post Ii was still not getting into the content browser after compiling the project but didn’t realize the file was still not added into my content browser.

2 Likes

Are you using hot reload? It’s still odd

I have the “live coding” option on, but I always have to save all my work in VS and then compile in the engine to see any changes, and like I said my C++ classes are never in my content browser when first loading up the project unless I compile it. It is very strange.

Live coding / hot reload is extremely experimental and everyone advises against using it as it seems to cause corruption. So you should close the editor, wait a few seconds (else VS is going to generate hot reload files), then compile in VS and reboot the editor afterwards. That might just solve it.

3 Likes

it seem to should reopen the project after closed:

  1. open the .sln and compile
  2. open the editor to continue the work

any other better way? thanks

No other way, because live coding / hot reload breaks the project.

1 Like

Same issue exactly!
I am using UE 5.0.3, and each and every time I launch the editor, blueprint who has c++ base classes just refuses to work! Same error:

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! Do you want to continue (it can crash the editor)?

I can see the C++ classes in the editor, and everything is fine, also project is source-controlled, so no file changed whatsoever.

The solution was to close the editor, rebuild from VS and then re-launch the editor.
Is anyone even using UE 5? It has so many bugs it’s unbelievable.

2 Likes

Can confirm this seems to be a problem with live coding. I can’t quite figure out what is causing it or when it happens. Unreal 5.0.3.

One thing I’ve noted is that sometimes the files in C++ Classes/MyProjectName/ will just disappear from the content browser, but only some of them.

I can confirm they still exist by right-clicking the content browser and “show in explorer”.

I need to turn off “show C++ classes” in the content browser, turn it back on again, then they appear again.

However this doesn’t fix the missing blueprint parent issue. It seems the only way around this is to not use live coding, for me at least.

I’m facing the same issue. The interesting part is that I have live coding turned off a while ago and everything was fine. While I modified an BP the Editor crashed and suddenly a lot of my BPs are parentless.

I also recreated a completely new project and the same issues appeared on the exactly same BPs.

Even if I fix the issues manually, after restarting of the Editor, all changes are gone and references lost.

I tried to clear and rebuild project (also removed bin folder) but its not helping.
Hope someone can help me with this problem.

2 Likes

I found now a working solution for me. Hot Reloading seems to be the problem in my case. I turned on Live Coding and removed all corrupted BPs. Than I closed Editor and cleared + rebuild the project via IDE (vs code). Than I revert my changes via Source Control to get deleted BPs back.

Start Editor and all corrupted BPs works again.

This page helped me to understand the situation → Hot Reload and Live Coding | Unreal Engine Community Wiki

Hope this helps if you facing similar issues

I was having the same problem

You gotta disable live coding

I have no idea why it is even included in UE5 because i would do massive projects, then save only to greeted by a missing parrent class that would have me do all my work over again

Is there a way to recover the work once it has been corrupted? Is this bug in the process of being fixed?

Hi, I just had this issue using UE 5.1. To recover the corrupted blueprints I did the following:

  1. Disable live coding in the editor
  2. Close the editor
  3. Recompile solution using Visual Studio
  4. Open the editor again

I lost the instances of those blueprints in my level but at least the blueprints themselves were fixed.

1 Like

Hi,
Same issue (as reported) in 5.1.
The workaround that is working in my case:

  • Open in UE editor the C++ project
  • Open the c++ project solution file in Visual Studio (I’m using VS 2019)
  • In Visual Studio / Solution Explorer run the build process
  • In UE editor press the “Recompile and reload the c++ code” button
    This will make the c++ classes in the UE editor visible again. However, the child BPs still have the Parent set to “None”.
  • In UE editor go to the child BP right click and select Asset Actions/Reload
    In my case this correctly restored the parent c++ class.

I’m currently using Unreal Engine 5.2 version that was recently released at the time of writing this. This problem still persists. Disable live coding.