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
-
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
- [OpenGLES][XR] Zooming in on the camera's URP opaque texture causes "double vision" on Quest in OpenGLES3
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
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.