mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-17 18:40:33 +00:00
fix(PerlineNoise): fixed error for Undo
This commit is contained in:
parent
b39d7bd8d2
commit
de2ed26eee
@ -21,8 +21,9 @@ void GenerateTerrain()
|
|||||||
Debug.LogError("No Terrain component found on this GameObject.");
|
Debug.LogError("No Terrain component found on this GameObject.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if UNITY_EDITOR
|
||||||
Undo.RecordObject(terrain, "Generate Perlin Noise Terrain");
|
Undo.RecordObject(terrain, "Generate Perlin Noise Terrain");
|
||||||
|
#endif
|
||||||
terrain.terrainData = GenerateTerrainData(terrain.terrainData);
|
terrain.terrainData = GenerateTerrainData(terrain.terrainData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user