Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0f3
Issue ID
1024605
Regression
No
[Terrain] Ctrl + Z or CMD + Z does not undo Alpha Maps changes in TerrainData
When using Undo.RegisterCompleteObjectUndo(terrainData,...) before changing terrainData, then you can only undo changes to Heightmap and DetailLayers but not to Alpha maps. Using Undo.RecordObject instead only leads to a freeze (or really long loading) when pressing Ctrl+Z or CMD + Z
To reproduce:
1. Download attached project "TerrainUndoTest.zip" and open in Unity
2. Run scene
3. Select "Terrain" GameObject
4. Press on button "Change Terrain in Rect" in Component TerrainChanger
5. Observe that a part of the Terrain is now green instead of blue and the green part is higher
6. Press Ctrl+Z or CMD + Z
7. Observe that the changes to the Height Map were undone correctly, but the area is still green, so the Alpha Map changes were not undone
Notes:
- This issue reproduces on both Windows and OSX
Reproduced on Unity 5.6.5p4, 2017.1.3p3, 2017.2.2p3, 2017.3.2f1, 2017.4.1f1, 2018.1.0f1 and 2018.2.0b1
Comments (1)
-
THE2FUN
Sep 25, 2021 20:44
It's fixed with adding all layers to layer tab it will be fixed. Terrain Tools Installed and using MapMagic 2 by the way.
You can add in your project if you can't see in package manager:
com.unity.terrain-tools
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- New ShaderGraph SubGraph remains dirty when the non-existing changes are discarded
- Inspector window flickers when a selector is created using a Style Class List Section
- [iOS] "UnityBatchPlayerLoop()" causes a freeze in the iOS application when it is put to the background and brought back to the foreground
- "Perform Selected" of Shortcut Manager window does not perform the shortcut in some cases
- Crash on mono_get_hazardous_pointer when running Play Mode tests in a specific project
Resolution Note (2018.3.X):
For correctly undoing a terrain texture paint, You would need to register the undo for all the alpha maps as well as the terrainData object. In 2018.3 we have a whole new set of APIs that helps ease the process of painting a terrain and takes care of undoing automatically.