Announcement

Collapse
No announcement yet.

How do I expose a variable in the editor and make in editable?

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

    How do I expose a variable in the editor and make in editable?

    I tried this
    Code:
    	UPROPERTY(VisibleAnywhere,EditAnywhere, BlueprintReadWrite, Category=Attributes)
    	float health;
    but it is still grayed out in the editor.

    #2
    Delete VisibleAnywhere; either put visible or edit, they can't work together.
    Thanks to JamesTan for pointing it out for me few days ago
    Alone: The Untold - a story driven horror game

    Comment


      #3
      Nice! I was wondering why only some of my vars are editable. Thanks!

      Comment


        #4
        Hi,

        I've seen a few different people run into this issue, so I went ahead and added a UHT error for it:

        Path\To\ClassName.h(34): error : In ClassName: Found more than one edit/visibility specifier (EditAnywhere), only one is allowed

        CL# 2038938 in main, should be in 4.1.

        Cheers,
        Michael Noland

        Comment


          #5
          Are these variables actually editable in the blueprint graph or only in the defaults section?
          I have a property with EditAnywhere and can edit it in defaults, but I seem to miss how to change it using blueprint events.

          Comment


            #6
            Hi ekhaede,

            Blueprint access is controlled by specifying BlueprintReadOnly or BlueprintReadWrite, and is totally independent of details panel access (EditAnywhere, VisibleAnywhere, etc...).

            If you have specified Blueprint access, they should show up in the palette and the right-click context menu, but will be filtered out of My Blueprints by default (you can use the "Show inherited variables" check box to control this).

            Cheers,
            Michael Noland

            Comment


              #7
              Originally posted by Michael Noland View Post
              Hi,

              I've seen a few different people run into this issue, so I went ahead and added a UHT error for it:

              Path\To\ClassName.h(34): error : In ClassName: Found more than one edit/visibility specifier (EditAnywhere), only one is allowed

              CL# 2038938 in main, should be in 4.1.

              Cheers,
              Michael Noland
              Hey Michael,
              This update conflicts with whats going on here:
              https://www.youtube.com/watch?v=Q3AvZmZEPyc#t=880

              Which has made setting up new code via that method...quite confusing. May want to add a comment somewhere on that video to avoid further confusion with 4.1.

              Comment


                #8
                Hi Tybera,

                Thanks for the report. I forwarded it onto Jeff to see if he can add a comment bubble to the video.

                Cheers,
                Michael Noland

                Comment

                Working...
                X