Is there a way to convert blueprints to text, and convert text back to blueprints?

I want to convert the blueprints to text so that I can merge, and then convert back to the blueprints.
I know that unreal supports converting blueprints to text(https://www.buymeacoffee.com/ryanjon2040/unreal-tip-94), but I haven’t found a way to convert text back to blueprints.

Hello Zyf, Welcome to the Forums.

I’m not sure how immediately useful it would be, but try copying Blueprint nodes and pasting into a text editor to see the syntax. (I’m imagining software to ingest/merge/output nodes)

I also came across GitHub - KennethBuijssen/MergeAssist: Unreal Engine plugin prototype which provides a way to visually merge blueprint graphs

Also, just wanted to make sure you were aware that there is a BP Diff tool. (But I’m not seeing any merge functionality with it.)

1 Like

Thanks Astrotronic, I know this BP Diff tool, but it is read-only and has no merge functionality. And I’m going to try your recommended MergeAssist.
In addition, I found that the TextAssetCommandlet in Unreal can convert asset to text, but it can not directly convert text back to the asset. Then I readed the code of it, I thought I can create a new Commandlet to convert text to the asset, the key is to use this code:

// read .utxt file
UPackage* Package = nullptr;
Package = LoadPackage(nullptr, *SourceLongPackageName, LOAD_None);

// write .uasset file
SavePackageHelper(Package, *DesFilename, RF_Standalone, GWarn, nullptr, SAVE_KeepGUID);

did you find a way yet?

By text do you mean a c++ file? If you right click a BP class there should be an option in there to view header fill it will show you a hypothetical. h file you could copy and paste

To store blueprint in text:

  1. Select all the nodes in ur blueprint, hit ctrl+c

  2. open text editor, hit ctrl+v

  3. save text document to whatever

To restore blueprint from text:

  1. Open text document in text editor

  2. Hit ctrl+a to select all, then ctrl+c to copy

  3. Open a blueprint editor in unreal

  4. Hit ctrl+v to paste