Hello, I am trying to make my variables public so I can use them in the details panel.
I would like to create a few of them but hide them after a check.
UPROPERTY(EditAnywhere)
bool ShowVariables;
if (ShowVariables)
{
UPROPERTY(EditAnywhere)
float speed = 90.f;
UPROPERTY(EditAnywhere)
float walkingSpeed = 70.f;
}
The idea is that I click the checkbox in the Details panel and if the checkbox is clicked it then shows variables like speed, if I uncheck it, it hides them.
Is something like this possible?
I get an error saying I can not use the if because it expects a declaration of the if.