public specifier vs meta = (AllowPrivateAccess = "true")

In what cases is it best to use each of them?
And what is the difference between:

public:
UPROPERTY(EditAnywhere)

and

private:
UPROPERTY(EditAnywhere, meta = (AllowPrivateAccess = “true”))

AllowPrivateAccess = “true” is only necessary for private properties that you want to make a Blueprint Getter or Setter node for with BlueprintReadWrite or BlueprintReadOnly.

Otherwise you are forced to make the property Public in C++ also.

1 Like

Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.