BCE0005 Script errors with terrain Stitcher

Hi guys, i need to some help with some scripts as i have no idea how the code :slight_smile:

I have basically stitched 2 maps together with Terrain Stitcher and have 3 BCE0005 Errors and i have no idea how to fix them as i have no coding knowledge what so ever :slight_smile:
Here are the lines i need fixed if anyone can be so helpful,

var terrainObjs = new Array(EditorUtility.CollectDeepHierarchy([terrain1, terrain2]));

terrainObjs = terrainObjs.concat(new Array(EditorUtility.CollectDeepHierarchy([terrain1.terrainData, terrain2.terrainData])));

Undo.RegisterUndo(terrainObjs.ToBuiltin(UnityEngine.Object), “Stitch Terrains”)

If anyone could point me out what needs to be fixed it would be greatly appreciated.

Thanks in advance,
Andrew

Can anyone help me with this code please the first 2 lines from above have,
BCE0005: unknown identifier: 'EditorUtility,
and the last line has
BCE0005: unknown identifier: Undo
all in the error console, i really need to get these fixed so i can build it to show as a project.
Thanks

Place the script in the Editor folder in your project. Then it should compile.