Failed to load CableComponent

127924-capture.png

Hello,

I’m working on a C++ project and my default pawn needs to have a cable component.
Base class for the pawn is C++ but the instance is blueprint and that’s where I add the cable component.
I add it, I play, everything is ok but if I close the project and reopen it, the cable is gone (error above).

I managed to narrow it down to the constructor of the game mode:

static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/Blueprints/Crane/MainPawn"));
if (PlayerPawnBPClass.Class != NULL)
{
     DefaultPawnClass = PlayerPawnBPClass.Class;
}

This is where I assign the pawn class and if I remove those lines and just have an instance of it placed in the scene, I don’t get the error message. As I’m writing this, I just realized a workaround might be just that, place the pawn in the scene and posses it a bit later.

I can confirm that placing the pawn in the scene and possessing it on begin play in level blueprint no longer causes the error to appear.

It seems it depends on loading order. I have two custom plugins with custom classes and components and I can use any components\classes from one module, but sometimes get the same errors with the second module. I guess this error appears when you have an Abstract BlueprintType\Blueprintable class in hierarchy and try to use it. Cable component is also defined in external module (plugin) and have an abstract object as a parent.

Hello ,

Does the workaround you mentioned work for you? I was unable to reproduce the behavior you’re seeing with the original setup but I wanted to ensure that this was resolved from your perspective.

The only downside to this workaround is that if you place the pawn in the scene, make changes inside the blueprint (change some material), not all those changes might be there when you hit play (that’s expected). You need to delete the pawn and put another one in the scene.
But yes, this workaround works for me.

I am also having this problem in 4.15 and this workaround is not useful in my case. Any blueprint that contains a cable component eventually has it deleted.