diff --git a/Assets/Mirror/Examples/_Common/Scripts/PerlinNoise.cs b/Assets/Mirror/Examples/_Common/Scripts/PerlinNoise.cs index 4b55f21a3..3c7063243 100644 --- a/Assets/Mirror/Examples/_Common/Scripts/PerlinNoise.cs +++ b/Assets/Mirror/Examples/_Common/Scripts/PerlinNoise.cs @@ -21,8 +21,9 @@ void GenerateTerrain() Debug.LogError("No Terrain component found on this GameObject."); return; } - +#if UNITY_EDITOR Undo.RecordObject(terrain, "Generate Perlin Noise Terrain"); +#endif terrain.terrainData = GenerateTerrainData(terrain.terrainData); }