Announcement

Collapse
No announcement yet.

[Bug] Setting Font via Struct members has false warning.

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

    [Bug] Setting Font via Struct members has false warning.

    When trying to set a font via "set members in struct" node I get an error saying that Font is read only. However, the function works, and font can in fact be modified this way.

    #2
    it is a misleading warning.

    You are not setting the variable to a different value (readonly forbids to do that). You are modifying it's members with the "Set Members" node.

    Comment


      #3
      To see if I understood you correctly, I put in a "set by reference" node with a "make font" node and got an error. So it seems, the code is detecting that I'm passing the font by reference and its worried that I'm doing something like the "set by reference" node? But it works, it just can't tell its going to, which is why its a warning and not an error.

      Comment


        #4
        It's probably a warning, because it'll work, but that's not how it should be done. The `Font` member is read-only, meaning you shouldn't modify its state with `Set members` node.
        Instead, you should use the `Set Font` node.
        Engine Contributions: GitHub
        Polars (WIP): Development Blog, Facebook
        Marketplace: Viewport Utilities, Blueprint Streams, Control Structures

        Comment


          #5
          I was trying to get around splitting the details and dragging over all the wires except for the 1 I wanted to edit, But oh well.

          Comment


            #6
            You can avoid that, just make a copy by making a local variable, you'll be able to set that with Set Members node, and use it for Set Font.
            Engine Contributions: GitHub
            Polars (WIP): Development Blog, Facebook
            Marketplace: Viewport Utilities, Blueprint Streams, Control Structures

            Comment


              #7
              That's a good suggestion, thanks.

              Comment

              Working...
              X