Copying and pasting terrain to other games is broken?

I’m attempting to copy and paste my terrain from another game, but when I try to paste it into the other game, the whole terrain editor just breaks. Handles move, but the box doesn’t, and when you click off of the terrain editor or change tools, the tab just closes and you can’t open it again. Errors also flood the console, and sometimes it just crashes??

Unsure if this is an engine bug, or one of my plugins breaking it, but I need help fixing it, if there is any fix.


Attempting to paste terrain


Attempting to drag after it breaks


And then whatever this error is whenever you go back to the studio tools.

I should note that copy and pasting terrain in the same place is a-ok, though.

2 Likes

Copy pasting between Studio instances is currently not supported. I’ve gone ahead and fixed this error, which is somewhat unrelated. I’m assuming this might be happening because you’re pasting in a session without having copied yet (and also because of some saving shenanigans).

On a different note, you can move Terrain from one place to another, but it is a bit more involved and requires usage of the command bar. Adjust the numbers in the Vector3int16 to match your region.

game.Workspace.Terrain:CopyRegion(Region3int16.new(Vector3int16.new(-512, -512, -512), Vector3int16.new(512, 512, 512))).Parent = game.Workspace

Now copy the TerrainRegion in workspace to your other place’s workspace and use, if you want to merge with existing Terrain in your other place, the third argument should be false, if you want to overwrite existing voxels with air, it should be true:

game.Workspace.Terrain:PasteRegion(game.Workspace.TerrainRegion, Vector3int16.new(-512, -512, -512), true)

Unfortunately plugins currently don’t have access to clipboard in any meaningful capacity so TerrainEditor cannot support this behavior directly :frowning:

2 Likes

Well, it’s better than nothing. I’ll try it out, but I think there should probably be an error regarding this, and not just Studio flipping the table whenever you try, breaking the entire terrain tools.

I’m still working through bugs regarding Terrain Editor, freezing up Studio definitely isn’t something we want to be doing and I fixed/am fixing this issue soon.