Import Actors from Text by Blueprints/C++

Hello there,

When copying objects within the World outliner, be in the Editor during runtime or not, it is possible to transfer these actors to other levels through Strg + C / Strg + V.
What you get is a readable script you can even copy into a text file.

My question is whether it is possible to do the same process with logic like Blueprints or C++ so I can create an Editor Widget to streamline this by merely pressing buttons.

In my specific case I need to make changes during runtime in a Read-Only Level and copy these changed Actors into a different non-runtime level.

I’m thankful for any suggestions!

Hi there! Do you need this in Editor? Or in Game itself?

Hi!
I’d like to copy them during runtime and insert them during editor mode

It is surprisingly hard to find anything about that script that is being produced during the Crtl + C process

Hello again!

  1. Take a look at UUnrealEdEngine class. Specilly on this method

It is executed while processing CTRL+C / CTRL+V combination ).

  1. The command text itself is generated by ULevelFactory class with its method

Hello Kehel18,

Thank you for pointing me in the right direction.

However it seems the second function does not “create into text” but rather “create from text” based on the added remark. So it is most likely the function to give the text buffer to.
I have yet to find the function that actually converts the selected objects into the text unfortunately

Look at this UUnrealEdEngine::edactCopySelected | Unreal Engine Documentation