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:
Create new SO for new NPC
Click on field for an animation
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?
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.
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!
I will definitely check out your script in detail!