Controller Cleanup
Animator controllers in Unity tend to accumulate a lot of leftover data that is no longer in use. Whenever you remove elements from a controller, there is a chance that not everything will be deleted properly. Over time a lot of unused objects can pile up this way. Sometimes they can lead to Unity constantly throwing errors like this one
43 of this ‘one’ to be exact. This tool will try its best to solve these issues by analyzing and recreating your animator controller based on what the controller actually uses (essentially clone the controller). Everything visible in the editor, such as (sub)state machines, states, transitions, state behaviors, etc. will be recreated. Everything that is floating around half deleted or not referenced anymore will not be recreated. This results in a clean, optimized version of your animator controller. The tool also allows you to exclude empty layers and states from the reconstruction. Alternatively, you can provide a fallback animation for empty states. Additionally, you can configure the "Write Defaults" option for each state (either individually or globally).
Limitations
This tool will make every effort to fully recreate your controller with all of its functionality. However, a 100% accurate result cannot be guaranteed. Unity’s animator controllers are quite complex, and the official documentation lacks some essential details. I’ve done my best to cover everything as thoroughly as possible.
There is one type of transition that this tool cannot recreate — not due to a lack of intent, but because Unity's public API does not expose the required functionality.
Transitions originating DIRECTLY from a sub state machine will not be recreated.
(The type of transition you can create by right clicking on a substate machine and select ‘create transition’). The tool will display a warning if it detects sub-state machines in your controller.
Also, recreating the LocomotionFix controllers caused unexpected behavior when testing. So, it would be best to not to use those controllers with this tool.