Animation workflow/Animations directly from sprites

Hi all,

I‘m looking for a good work flow to directly create animations from sprites (in the Animator), without the necessity to create a game object first.
The reason for this is, that I have a pretty basic prefab for my NPCs holding an Animation Override Controller, which I only need to provide the specific animation clip for an NPC. The clips for an NPC are stored in a scriptable object (with all the other information I need for that NPC).
So, what I basically do is to instantiate the prefab, inject the animation clips from the scriptable object and done.

But at the moment it is a bit tedious to create/modify these animation clips, as this always needs a GameObject.
To me the greatest option would be if I could just do it directly in my scriptable object, for example like this:

  1. Create new SO for new NPC
  2. Click on field for an animation
  3. Animator can be used as it does when a game object is selected.

I guess that this won‘t be possible, but is there at least any other better way to do this, without having to create over and over a dummy gameobject again?

Thanks for your help!

I haven’t worked with sprites much, but when I was working on examples for the upcoming update to my Animancer plugin I ended up making a bunch of functions for things like slicing textures into sprites and generating animations from them. You can grab the full script from here. It’s not polished into a real workflow or anything, I just edit the script as necessary each time I need to use one of the functions. Hopefully you’ll find it useful.

1 Like

Hi SilentSin,

thank you very much!
So you are proposing implementing editor scripts to take care of all the issues? That might actually work and is a great idea! :slight_smile:
I will definitely check out your script in detail!

Yeah, I was thinking it would probably work well as an EditorWindow that shows different functions depending on the Selection.objects.