Why are my UPROPERTIES greyed out in editor

In the header, my variables are set as VisibleAnywhere. I’ve also tried BlueprintReadWrite.

protected:
	UPROPERTY(VisibleAnywhere, Category = "PID")
	float Kp;

	UPROPERTY(VisibleAnywhere, Category = "PID")
	float Ki;

	UPROPERTY(VisibleAnywhere, Category = "PID")
	float Kd;

Kind of confused because right above this I have three components that are set to VisibleAnywhere and can easily be changed.

Anyway, here’s a screenshot of the editor with the greyed out properties:

Add EditAnywhere (to be able to edit in the Blueprints), or EditDefaultsOnly to be able to edit only in the object settings (scren you shown)

Example:

protected:
	UPROPERTY(EditDefaultsOnly, Category = "PID")
	float Kp;

	UPROPERTY(EditDefaultsOnly, Category = "PID")
	float Ki;

	UPROPERTY(EditDefaultsOnly, Category = "PID")
	float Kd;

thx feel dumb. Get an error when I have both VisibleAnywhere and EditAnywhere so I just removed the prior. Thanks again

1 Like

No need to feel dumb. We all learn all the time :).

Ah, sorry for that one. Edited my answer.

1 Like