Steps to reproduce:
- Create a new 3D URP project
- Drag the attached "Gradient.cs" script into the Project window
- In the Hierarchy, create a new GameObject and drag the script onto it
- Select the created GameObject
- In the Inspector, click on the Gradient field
- Click on any of the bottom markers
- Change its color
- Move the marker
- Click Ctrl+Z to undo
- Observe the behavior
Actual results: The selected color is removed from the marker and marker returns to initial position. Undo removes all marker changes, not just the selected one
Expected results: Only the last action should be undone. The marker returns to its initial position, while keeping the previously assigned color
Reproducible with versions: 6000.0.75f1, 6000.3.15f1, 6000.4.7f1, 6000.5.0b8, 6000.6.0a4
Tested on (OS): Ubuntu 24.04, macOS 26.4
Notes:
- Undo removes all marker changes, not just the one selected
- On macOS if a gradient preset is selected and the marker is moved, undo removes the entire gradient and it becomes white
- Before [Internal link], undo may keep the marker color but fail to restore the marker position correctly