Embedded Animation Scripts

Hi,

Just wanted to share some editor scripts that will allow you to create animation clips inside your Animation Controllers like when button animation controllers embed their Disabled, Normal, Highlighted and Pressed clips in their controllers.

I created the scripts as I fount the idea of embedding the animations much more convenient and tidy as opposed to creating seperate files for each one

Not sure if you may find them handy?

REQUIREMENTS: Unity 5.x - download the v5. Unity 4.6 (not tested prior versionss) - donwload the v4. The difference is in Unity 4 programatically creating an animation clip defaulted to the legacy animation clip type which required changing to Mecanim type, Unity 5 this is no longer needed.

DISCLAIMER: I will not be responsible for any damage to your projects, you should always back them up and/or version control them in case of error. Test thoroughly on a test project before deciding to use in the your main projects if you like it. Unfortunately I dont really have time to support them, I have been using them now for my projects, if they work for you great, if they don’t feel free to post but I can’t guarantee anything. ALSO - there’s prob a lot of Unity experts out there who may be able to look at the scripts and improve them in case they do not cater for all situations or not entirely appropriate, rather than bash me please post an educational response and feel free to make the necessary modifications!

USAGE:

Under Assets folder, create Editor Folder and place script inside. In the Hierachy window when you right click on an Animation Controller, or a clip within the Animation Controller, go to Embedded Animations menu and the rest should be self explanatory.

2178470–144317–EmbeddedAnimationControlsv4.cs (2.87 KB)
2178470–144318–EmbeddedAnimationControlsv5.cs (2.87 KB)

Hello,

just an addition to embed existing animation files into the controller

2795647–202768–EmbeddedAnimationControlsv6.cs (4.73 KB)

More improvement

  • When you embed animation they are not duplicated anymore
  • You can now embed animation even if they are already some in the controller
  • You can extract an embedded animation

2863774–209689–EmbeddedAnimationControlsv7.cs (9.12 KB)

1 Like