Transfer PIE actors to Editor

Hello!

I’m working on a railroad building system for my game. I want to use the same system to build the default track, that the players later can add to or remove.

The current workflow i have is this:

  1. Build track in PIE.
  2. Press F8.
  3. Select all new track pieces.
  4. Ctrl + c to copy.
  5. Exit from PIE mode.
  6. Ctrl + v to paste the tracks in the editor.

The problem is that it can be very tedious to select all new pieces if you have built av few km of track. And it is easy to select wrong and get a double (leads to bugs and is hard to find).

My plan is to make a editor utlity widget, that with a button click:

  1. Select all new railroad actors (tagged as new when i place them).
  2. Transfer them to the editor world.
  3. Remove the tag.

The problems i have is:
Selection: SetSelectedLevelActors (BP node) do not work on PIE actors.
Copy/Paste: can you do that some how in a editor utlity widget?
Is there a better way to transfer the actors? Copy/paste is very slow!

Thankful for any tips!
/Johan

And now copy/paste is not possible any longer :sweat_smile:

Just after i wrote that i got an idea that might work!

  1. Make a console command that find all actors with interface and the tag added at build.
  2. Collect all needed information, class, transform etc.
  3. Write that information to a Data asset.
  4. Later in editor, run another console command that spawn the actors stored in the data asset.

How do i add console commands for the editor? The first i just put in GameMode and it works just fine with collecting all needed data. But the game mode do not exist in the editor. I guess i could make a editor widget to recreate the actors, but i prefer a console command!

I went with the editor utility widget, it works perfectly!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.