Unity skips some changes in undo history; does not undo the last action, but some action before that

Steps to replicate:

  1. Create a cube on the scene
  2. Change cube X scale to from 1 to 2; the cube changes size accordingly
  3. Move the cube some way to the left on the X axis
  4. Press Ctrl+Z

Expected behavior: cube goes back to its original position along the X axis

Actual behavior: cube scales back to 1 but stays where it is

To put it simply, most of the time Unity tries to undo not the actual last action, but some action that happened before that. Some changes (like, in my example, moving the cube) can never be undone at all.

How to deal with this problem?

I have the same problem. I modified the color of a mesh, didn’t like it, tried to Undo back to the original color, and the Unity IDE just went right past it like it didn’t even know that I had changed it. Perhaps changes to items in the Project View don’t get added to the Undo Queue, because they are on-disk and not in-scene? That sounds a bit crazy, but I’m new at Unity. :-\

It does seem to remember every single object I’ve ever clicked on, but certain changes it just seems to ignore.