Editor empty component in case of double C++ inheritance + blueprint inheritance

Hi!

In C++ I have class “Base” which is derived from AActor and contains static mesh component:

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Mesh)
UStaticMeshComponent* ItemMesh;

In constructor:

ItemMesh = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("ItemMesh"));

Also in C++ I have class “Child” that is derived from class “Base”.
Then I have created blueprint class “BP_Child” which is derived from class “Child”. Right now everything is good and I see properties of static mesh component in blueprint editor.

But when I modified class “Base” and changed ItemMesh class to USkeletalMeshComponent, recompiled project and got back to the editor, I couldn’t see any properties anymore. Editor reloading doesn’t work. The only way is recreation of the blueprint class “BP_Child”. Is this a bug or am I doing something wrong? What should I do to be able to view component properties in inherited blueprint class from double C++ inheritance?

Regards,
Ivan

You most likely need to reparent your blueprint again to that same class e.g. to “Child”, that might fix your problem as it seems that your blueprint metadata got corrupted by changing it to SkeletalMesh one…

1 Like