sample:
I have have cutscene where the player says something "I will try on this hat"
then a mecanim animation action enables a hat he is wearing.
then he says "The color of this hat doesn't match my eyes."
then a mecanim animation action which removes the hat.
when I skip the cutscene while he says "The color ..."
(skip via script : AC.KickStarter.actionListManager.EndCutscene ();)
then the mecanim animation which removes the hat isn't processed and the player
now wears the hat forever.
It would be great if the could force the animations at the end of a cutscene that reset the state could be checked optionally like [x] run when skipping.
something for the time after 30th April :0)
Comments
i think the easiest way is the 'run when skipping' checkbox.
the animation reset actions already exist . they just need to be called when skipped
we ll see what chris thinks in may :-)
The ActionList: Check running Action should not be looped - having it run once is enough. When an ActionList is skipped, it is re-run from the very start to ensure that the effects of all previously-run Actions are also skipped. Checks are in place to ensure that e.g. Variable Actions are still run correctly. Apologies to @Alverik if I gave wrong advice about this.
Therefore, the ActionList: Check running Action will always be run when skipped, regardless of whether or not you've passed that Action naturally before the skipping feature is triggered.
The rules for how AC treats a skipping animation Action vary between animation engine and the method within that Action (changing parameter, playing clip by name, etc), but Unity has trouble with being told to set a boolean parameter to True and False in the same frame.
The way around this is to end your ActionList with an animation Action that resets your animation state manually, by playing the intended animation clip by name, rather than changing parameters. As @Alverik said, this is technique is covered in the 3D tutorial (specifically, this section). Your idea to reset the animation with Object: Animate is correct - you just need to change the Method to Play Custom.
public override void ActionCharAnimSkip (ActionCharAnim action)
{
//if (action.methodMecanim != AnimMethodCharMecanim.ChangeParameterValue)
//{
ActionCharAnimRun (action);
//}
}