Component class override - buggy?

Hello,

I’m trying to overwrite the class of a component. The component is defined in C++ like this:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Rendering")
class UStaticMeshComponent* StaticMesh;

In the editor, I get a box showing me which classes I can select as replacement (see screenshot).

Now, no matter what class I select from that list, once I compile the blueprint, if I view the StaticMesh-component again it shows the selected class to be “None”. It will now also fail to spawn the Blueprint properly. Saving the selection will also not work, no matter if I save before compiling or after it, it will be “None” while running, and after a restart of the Engine it will have selected the default class (“Static Mesh”).

This happens for all component-classes I tested it with. I have a custom component where I actually need it, but I thought using mesh as an example is easier to reproduce.

Now, is there anything I have to do to make this work? Or is there a bug regarding this in the current version of the engine?

You must to create your own class in C++ drived from UStaticMeshComponent