When would you use AllowPrivateAccess?

E.g. when I use it: if you want your property to be private, but you still want the derived blueprint to be able to access it, you add use e.g.

UPROPERTY(BleuprintReadOnly, meta = (AllowPrivateAccess = "true"))

Without AllowPrivateAccess the compiler will throw an error saying something like “you can’t make a private property blueprint visible”. AllowPrivateAccess helps circumvent that.

IDK if it works for derived c++ classes though; never tried it.

1 Like