Can't load invalid AnimController to fix it

Following these steps lead to a corrupted AnimController asset that resulted in lost work.

  • I made some changes to an AnimController asset (all via the Unity Editor).
  • There was a mistake; I was still referencing a deleted param in an exit transition from a subState machine.
  • I didn’t notice this, ended up closing Unity, and later relaunching it.
  • The Editor can’t load it. Says it’s invalid. I am unable to fix it.

Luckily, I use source control, and I reverted to a previous working version. However, I lost work, and others who encounter this might lose an entire file.

I don’t think referencing a deleted parameter should cause a problem like that. You should see if you can reproduce the issue in the latest Unity version and submit a bug report.