What if Private variables can be readable via the get function?

Hey guys. I am working on a project, and in my blueprint, I am setting a variable for the blueprint to use internally. So I set it as private, so nobody can modify it but itself, to keep things neat and keep track of everything.

However, I would like to, even though I can’t set the variable, I can’t modify it, (which is good, that’s what I want), I should at least be able to read the current variable value using the get function for it, as it might be useful for other reasons. Maybe some physics actor want’s to know if the water body is rising. So the physics actor should be able to know what the value is, but not modify it because it’s private.

IsWaterLevelLowering is private.

http://puu.sh/jp9t6/cdf9565749.jpg

I can’t set the value outside, which is good. But what if I want to read it?

http://puu.sh/jp9wG/e74495aec9.png

You can get any private variable from any object by making a custom get function within the object and then referencing the object.