Announcement

Collapse
No announcement yet.

Small Blueprint variable changes that would provide huge flexability.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [BLUEPRINT] Small Blueprint variable changes that would provide huge flexability.

    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.

    #2
    Specifier is a real word. It's the noun form of specify... js
    Youtube
    Machine Learning C++ Plugin
    Lindenmayer System C++ Plugin

    Comment


      #3
      Additional to this request:

      (Const) Pure Interface Functions
      That'd be great.


      Access Specifiers for Events
      They are public only, but have the feature to be latent which void functions cannot be.

      Comment


        #4
        I'd love to see better control over function/variable access. Ability to set public/protected/private access would bring blueprints closer to standard programming.

        Originally posted by wilberolive View Post
        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.
        But still you can change this value in C++, so calling it constant would be misleading. Current name is perfectly clear for me.

        Comment


          #5
          Originally posted by kjustynski View Post
          But still you can change this value in C++, so calling it constant would be misleading. Current name is perfectly clear for me.
          I suggested renaming it due to the naming conflict with my second point. Perhaps Blueprint Constant would be better.

          Comment

          Working...
          X