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. :stuck_out_tongue:

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

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

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.

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?

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.

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

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.

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

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 ! :smiley:

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…

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.

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

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.

i have 50 blueprints with probably 1000 vars etc. I need to be able to copy and paste. Im loosing a week to fix this manually. Migrating a folder with everything breaks them too.

Some year ago (maybe 2016, I don’t remember anymore)
I built a tool to do this, transfer variables between many unrelated blueprints of any class without making them parents of each other.

But, it doesn’t have a GUI and if you don’t know C++ it’s dangerous to use…
I will search to find in which HDD the codes for that thing is… If I find it, I will see this weekend how hard would be to make a Editor Plugin with UI, that would allow for any developer to use it safely :slight_smile:

On old Unreal Engine yes, it worked fine.
But now I don’t even know if that thing is still working (I will probably have to rewrite some things) because from Unreal 4.19+ onwards a lot of those “Kismet Compiler” stuff changed.
Those changes caused a lot a headache with the ObjectPool plugin, etc.

For now I just noted here “find Property Transfer cpp source”, because I don’t know where it is lol

I will take a look tomorrow, this saturday.

I’ve found the old source and today had some work done to port it to Unreal 4.20…
Inspired by Maya/3DS “Attribute Connection Editor” I began working on a small Unreal Editor plugin to add a similar window where we can pick the properties we want from the ‘Source’ and batch apply to all ‘Targets’ selected on Asset Browser:

Isn’t fully working yet (the UI), there’s stuff missing, but when complete I will be glad to share the tool :slight_smile:

The good thing is we won’t need to have any of the Blueprints open on Blueprint panels, just have to select their assets from Asset Browser.
This is great to recover properties from corrupted Blueprints that crash when asset open.

I’ve been working on the UI some more today at home;
The tool is already working, I’ve used it a few times here and there…

There’s still some more things I want to implement though (copy functions signatures + local function variables, etc), but the basic functionality is there:

After picking properties you need to copy to target classes, the ones show in green will copy successfully;
Orange ones are conflicting that already exist on target and red means it wont copy even though I moved it to target (right panel).
Once you click “Apply” button, the plugin will copy green properties + compile the target Blueprint + ask if you want the changes to be saved on a popup.

If anyone is willing to help me hunt for bugs before I publish the tool, would be great. PM me :slight_smile:
I will not charge for this, no worries; there’s only a few thousand lines of code so far.

This is really neat [USER=“434”]BrUnO XaVIeR[/USER] . Does your tool handle name conflicts and stuff like that?
I’d also be interested in where in the source all this stuff lives for the most part. Seems like a true Blueprint merge tool would do some similar things.