Skip to content

Instantly share code, notes, and snippets.

View Romelium's full-sized avatar

Romelium Romelium

View GitHub Profile
@Romelium
Romelium / TerrainDataCloner.cs
Last active February 18, 2022 10:37 — forked from zsoi/TerrainDataCloner.cs
Helper to deep-copy a TerrainData object in Unity3D
using UnityEngine;
namespace ZS.Tools
{
/// <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
{