Why doesn't my C++ component have any editable properties?

I create a new USceneComponent in C++ using “Add New C++ Class” in the editor, and re-build in Visual Studio. (This also happens when deriving from, for example, UProjectileMovementComponent)
My component has some UPROPERTY(BlueprintReadWrite,EditAnywhere) properties, as well as the properties inherited from the superclass.
However, when I add this component to my actor, and select it in the editor, I can see no properties to edit.

For example, here’s a (partial) declaration:


UCLASS( ClassGroup="Gameplay", HideCategories = (Object, LOD, Lighting, TextureStreaming), Meta=(DisplayName="Radar Component", BlueprintSpawnableComponent) )
class TWINSTICKTEMPLATE_API URadarComponent : public USphereComponent
{
GENERATED_BODY()

public:
// Sets default values for this component's properties
URadarComponent();

UPROPERTY(Category = Radar, BlueprintGetter = GetRadarRange, BlueprintSetter = SetRadarRange)
float RadarRange;
UPROPERTY(Category = Radar, BlueprintReadWrite)
float PingsPerSecond;
UPROPERTY(Category = Radar, BlueprintReadWrite)
float RadarConeAngleDegrees;
UPROPERTY(Category=Radar, BlueprintReadWrite)
float HysteresisValue;


And here’s what it look like in the editor:

I believe you need EditDefaultsOnly for it to show up in the details panel, at least one of the Edits meta for it to show up in the editor. Also hot reload might fail you here sometimes.

One way to test is make a duplicate of your blueprint and see if its details panel works. These means the original blueprint has stuck serialization.

@jwatte
In your code you are not using **EditAnywhere **or **VisibleAnywhere **in your UPROPERTY.
Try to use in the UPROPERTY of your Components and Actors.

I have tested making new blueprints with the same component, and they also show up empty. (Note: the native component is added to a native pawn subclass, so I create a new instance of the pawn subclass)

This gave me enough of a job to realize what the problem was. The native component itself didn’t have VisibleAnywhere, only BlueprintReadOnly. Thanks to you both for the clues that led me to the answer!

1 Like