I am working on sequences right now so I had a good look at the built in command list. So far so good.
Here is my test script:
Fade(in,2); SetActive(HERO_SCENE_PREFAB, false);SetActiveHero_Puppet, true); SetEnabled(animationRandomizer, false, SpineMentor); AnimatorPlay(IDLE_ALT0, Hero_Puppet)@2;
What I do here is replaceing my ingame player character with a puppet (Spine Mecanim animated)
I do that because I have the problem, that when I trigger Animations with f.e. AnimatorPlay(IDLE_ALT0, Hero_Puppet)@2; the animation gets played but only for one frame. So after deactivating a lot of scripts that control the character I thought I test it with just the spine gameobject wich is my Hero_Puppet. This way I can exclude that it is for any another reason. (I had the same problem with my player character, hence thats way I am doing all this

Ok, when I start the animatin it gets played for one frame, after that it jumps back to idle.

I did some test with the animator because something has to push it back to idle for some reasons. So what I did is to delete the transition from Any State to IDLE. And from there on it worked. But well, deleting this transition is no solution because I need it.
Well I could create a new controller for the puppet. But to be honest I would prefer not to use the puppet in the first place.
Do you have any idea how I can work around this problem?
This would be soooo very helpful!
Thank you in advance!