Skip to content

Instantly share code, notes, and snippets.

@Volantk
Volantk / TerrainDataCloner.cs
Created August 6, 2020 11:57 — forked from Eldoir/TerrainDataCloner.cs
Helper to deep-copy a TerrainData object in Unity3D
using UnityEngine;
/// <summary>
/// Provides means to deep-copy a TerrainData object because Unitys' built-in "Instantiate" method
/// will miss some things and the resulting copy still shares data with the original.
/// </summary>
public class TerrainDataCloner
{
/// <summary>
/// Creates a real deep-copy of a TerrainData