UStaticMeshComponent default value can only be set in data-only blueprint

When setting the default value for a property of type UStaticMeshComponent*, an asset can be selected when a blueprint is in data-only mode, but NOT when it is in the full editor.

To repro:

  1. Make a C++ class, inherit from actor, add the following to the .h file

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Grid") UStaticMeshComponent* TestMesh;

Make a blueprint from the C++ class, and edit it.

In data only mode, observe the following


This category appears, allowing you to select StaticMeshComponent, and an asset from the content library

Open full blueprint editor. Observe:


The option is no longer there. It is impossible to set a default value for this property.
If other properties shared the same category, they will still be present and so will their category. But this one will not be present in the category

This autoformatting is bloody awful

Change meta to BlueprintReadOnly, VisibleAnywhere and make sure to Construct and Attach it in the Constructor of your class.

You dont want to edit the Pointer :stuck_out_tongue_winking_eye: and its by Design - not a Bug

And if you want the variable to show up → click the Eye Icon in the Details Panel → Show Inherited variables.

Have a nice Day and good Luck with what you try to achieve =)