Example 1:
ani.loop = bLoop;
ani.AnimationName = stateType.ToString();
ani.state.Event += HandleEvent;
ani.state.Complete += HandleComplete;
When this is written, it causes premature execution of the OnComplete callBck.
For example, it would take 3 seconds to finish the play,
But in 2.5 seconds, the back drop function is executed.
Example 2:
ani.state.ClearTrack(0);
ani.state.SetAnimation(0, stateType.ToString(), bLoop);
ani.state.Event += HandleEvent;
ani.state.Complete += HandleComplete;
When this is written, if I switch from an action that has not been played to another action.
(if the model has 2 balls, the 1 is the model itself, and the other is the sphere of special effects)
On the previous action without playback, the effects will be left on the model.
Is there a good way to clean up this problem caused by switching?
Tanks!