At the moment there are only two options on Blueprint variables that control their accessibility.
Blueprint Read Only - Which makes a variable read only within the owning Blueprint. This is effectively the same as making it a const variable that can only be set as a default value and never change after that.
Private - Which hides a Blueprint variable entirely from external Blueprints. They can neither get or set the variable.
I would like to propose some small changes to this set up that would make a huge difference to the flexibility and accessibility of Blueprint variables.
1. Rename “Blueprint Read Only” to “Const” or "Constant"
This would remain as a tick box and function the same way. The new name better reflects what it is actually doing.
Prevents calling Set both internally and externally. Calling Get is allowed in both cases.
2. New “Read Only” tick box.
When ticked, the variable becomes read only to other external Blueprints.
Prevents calling Set externally. Calling Set internally is allowed. Calling Get is allowed in both cases.
An option like this would be extremely useful when developing game systems or third party plugins. It allows critical variables to be exposed for reading, but prevents external classes from trying to set them, which could break the system or plugin. The only way to accomplish this at the moment is to mark the variable as Private and then create a Get function that returns the variables value. This really starts to clutter the Functions list when you have a lot of variables you’d like to expose but don’t want external Blueprints changing them.
3. Replace the “Private” tick box with an “Access Specifier” dropdown list.
This dropdown list would work exactly the same way as how it does for functions, with three options; Public, Protected and Private. This would allow variables to be protected the same way that functions are and brings Blueprint programming more inline with C++ programming where this sort of thing is possible.
P.S. “Specifier” is not a real word, but that is what you are using for functions already so I just copied it.