Question : Lecture 124, 3:05

If the variables that were declared in private, for instance Reach, were declared in Public, would that mean that I could change the variables with outside code?

I guess my real question is, specifically why would I declare a function in a public, protected, or private piece of the header file?

Thanks a ton,
Tele

public will be accessible to all class. Protected will be accessible to child class and private is only for the class created but with UPROPERTY(meta = (AllowPrivateAccess = true)) you will be able to make private variable exposed to blueprint with BlueprintReadOnly, BlueprintReadWrite, EditAnywhere and other property specifiers.

1 Like

Thanks so much!!!

1 Like

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

Privacy & Terms