Announcement

Collapse
No announcement yet.

Copy Variables between Blueprints

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

    Copy Variables between Blueprints

    I know you can duplicate a blueprint, but in some cases I don't want a full duplication.

    I just want the variables.
    Is there a way to duplicate all the variables of one blueprint and paste them into another, all at once?
    If not, I would suggest such a feature be added as doing that manually is quite the time sink. :P


    I did a search but could not find anything related.
    Tho if I missed something, please direct me to the previous discussion.
    Thanks.

    #2
    I don't think there is, it would be easier to duplicate it and strip out the stuff you didn't want

    Comment


      #3
      That would only be true if what I wanted stripped out was less numerous than what I wanted to keep... (in my case, it was not)

      It would also be useful to copy variables in the case of the origin blueprint being bugged, and the bug migrated with the duplication.
      (And by bugged I mean something borked in the editor, not a script sequence)


      And for context, I don't need this as an immediate need.
      Ive already spent the time to make the transfer, but it would be good to have in the future if I need to do it again.
      Thanks again for any help.

      Comment


        #4
        Hello,
        If you want copy variables itself, doing a copy paste of blueprint content (why not set all variables at same place and copy paste all) and then do right click create variables does it faster than create all. But you'll have to set values. Maybe a struct could help, not sure how. Could be saved in game instance for example and used when needed.

        Comment


          #5
          Originally posted by Fen View Post
          Hello,
          If you want copy variables itself, doing a copy paste of blueprint content (why not set all variables at same place and copy paste all) and then do right click create variables does it faster than create all. But you'll have to set values. Maybe a struct could help, not sure how. Could be saved in game instance for example and used when needed.
          Im having some trouble following what your trying to say.
          I think you are suggesting I copy nodes of the variables into the new blueprint and then promote those nodes to variables in the new blueprint?

          Comment


            #6
            Yes, if you want the list of variables from a blueprint to another, you select them in your blueprint, ctrl c. and ctrl v in new blueprint, then right click on translucent variable and "create variable" then you have all your var created, but they are empty and you have to set value. Not sure this is what you were looking for but it is faster than create a var, type the name, compile, enter value one by one.

            Comment


              #7
              Cool, just wanted to confirm I was on the same page.
              Still feels like a work around, but is a good idea.
              Thank you.

              Comment


                #8
                I know this is an old thread, but when you search for this topic it is still a problem, and some solutions are not correct.

                Control C and control v NOR Command C, Command V work for copying variables.

                The only way I know to do it is this :

                1 ) Drag the variable you want copied in your blueprint into your graph as a "Get reference"

                2 ) Copy this using your cntrl-c or cmd-c command

                3 ) In your new blueprint cntrl-v or cmd-v the node you copied.

                4 ) BEFORE you compile and break it, RMB click on the node and choose CREATE Variable.

                5 ) compile and enter your values as needed for defaults.


                issues.

                It doesn't keep your variable categories.
                It doesn't maintain values.
                It doesn't remember if it was Editable or not

                I also don't know how to just copy over the Event Dispatchers, haven't tried functions or macros.



                It's sort of a slow way of doing something that should be easier and less prone to creating bugs, but it's better than a poke in the eye and it does maintain the Variable Type which is something. Okay, it's a bit like a poke in the eye.
                Last edited by Finn; 10-28-2015, 10:24 AM.

                Comment


                  #9
                  I suppose creating a child blueprint is not exactly what you are looking for?

                  Comment


                    #10
                    I've got the same need to copy variables from blueprint to blueprint.

                    In my case the blueprints have already been created long ago. I just need to add color variables on all interface blueprints for the coders to change the interface color as the players having bought a certain dlc for the game will have a slightly different UI.
                    I'm doing that manually right now but have hundreds of blueprints to add the same variables to... it's a huge timesink considering we have only 2 week to revamp the whole interface.

                    If, in any case, a solution for this issue is now available in UE 4.16 and someone knows about it, my sanity would be very thankful !

                    Comment


                      #11
                      Same problem here! I have 20 variable in one bluprint, and have 10 different bluprints that I need to copy this variables to. I can't copy bluprint because they are different and the difference is huge. Basically this bluprints are completely different that should have some similar functionality but still different. So I need exactly to be able to copy variables. Can't even believe this isn't something you can easily do...
                      Check out my works here: Youtube channel. Project: CityBattle | Virtual Earth

                      Comment


                        #12
                        This is just weird, seems so basic thing, RMB's "create variabe" with copying nodes letting you pass only names and types.
                        My situation is corrupped gamemode, checked every setting in every details page of working and the corrupted blueprints and didn't fount any difference, but one do working as intended while other don't, only difference is variables which need to move now.

                        Comment


                          #13
                          You mean Copying Variables as well as regular BP?

                          No, that's just what they'll be expecting us to do...

                          Why would you ever want to copy variables between Blueprints...
                          Ridiculous! Especially as UDK / Kismet could do this years ago!

                          BTW: Related to that: can you even properly copy functions now?
                          (You can copy the code but have to setup inputs/outputs manually)...

                          Comment


                            #14
                            How is this still not a thing? Is there a way to open the raw blueprint code and manually copy/paste the script code?

                            Comment


                              #15
                              4.20.1
                              I've got 19 variables, a few functions and a macro to copy from a blueprint to another of a different type (Actor into an ActorComponent) and it would be really helpful not to have to do them one by one.

                              Comment

                              Working...
                              X