Hi,
I'm a programmer and I'm trying to make things as simple as possible for our level designer.
He'd need to be able to play certain animations in response to certain events.
So an Inspector interface where he simple chooses the animation would be nice to have. I could write a custom inspector but it would be a little time consuming at the moment (we're rushing for a deadline, still the level designer should have the fastest way to implement actions, cutscenes and events)
Now, I'm using SkeletonAnimator+Mecanim, so my approach would be to statically add one or more bool parameters that override the current animation transitioning to the appropriate state/animation.
This of course means that I should have a different parameter and a different state and transition and user interface to handle all the possible animations to be played on request. E.g: isSitting, isReading, isLeaning, isKissing, is<any_action>...
I think this approach isn't very clean (and maybe switching to SkeletonAnimation would solve this, but can't do it right now, I think it's a bit late to do this) so I was evaluating the options.
One of the options would be to totally disable the animator and enable the legacy animator to play the individual clips... but I'm not sure the transition would be so graceful as I'd like it to be.
So I believe I should do it in some hackish way, since having to manually add a state, a parameter, a class, and editing an enum each time could become pretty boring and unefficient in the long run.
[side question]
Is there a way to enumerate/list the available animation clips (the ones that get created/updated manually on the animator) at runtime, so that I can build at least a dropdown menu with all the anims in the inspector?
I'm not very experienced with reflection, but also being able to enumerate all the bool parameters in a mecanim.
I'm a bit out of ideas about alternative solutions as I'm really not aware of the capabilities of the whole framework.
Could you please give me some tips or suggestions about this?
My main goal would be to be able to fire an animationClip on request, keeping it simple, Spine compatible, easy to mantain, and without requiring me to add a new Mecanim state+Parameter+C#code each time.
I wasn't unsure about sending an email to the support about this, but to me is pretty urgent since it's something that arose yesterday and the deadline is in 12 hours, so a timely answer would be appreciated 🙁
(@[supprimé] I'm begging you 😢 )