Debug Unity Animation Controllers Easily!

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.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Vincent Taylor

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