From de2ed26eeea70db75d40d23f8a17d17f8dea0dc9 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:51:07 -0400 Subject: [PATCH] fix(PerlineNoise): fixed error for Undo --- Assets/Mirror/Examples/_Common/Scripts/PerlinNoise.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }