Debug Unity Animation Controllers Easily!

Vincent Taylor
2 min readMar 15, 2022

Today I want to show a really helpful bit of code to help you showcase or debug your animations. Credit to Jason Weimann for the code.

Credit: Jason Weimann’s video

Disclaimer: I did not come up with this, and recently found it thanks to Jason Weimann’s recent video. I found it very useful, and wanted to share it with you.

The Code:

After creating a new “AnimationShowcase” script, we only need 2 methods (or even 1 if you want it all in Start):

In Unity:

Create a Canvas with a child Panel, with a Layout component attached (vertical/horizontal/etc), and a default button. Save the button as a prefab in your project files.

After adding the AnimationShowcase component to the Panel object, set the Animator and Button references:

If it’s all set up correctly, you can press Play and see any Animator Trigger parameters turned into functional buttons.

I know I found this useful, and I hope you do to!

If you haven’t already, check out his channel for some great Unity game development content.

--

--

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.