You create the variable as a UPROPERTY and also give it a special parameter. Here is an example:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExposeOnSpawn = true), Category = "MyClass")
int Foo;
You create the variable as a UPROPERTY and also give it a special parameter. Here is an example:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExposeOnSpawn = true), Category = "MyClass")
int Foo;