It looks like that some behaviors are changed in runtime. In "old" runtime after playing some not looping animation, it was NULL after animation is done. So i need change my code like this
skeletonAnim.state.GetCurrent(LEFT_WEAPON_TRACK) != null
skeletonAnim.state.GetCurrent(LEFT_WEAPON_TRACK).IsComplete
Although it works, i have another problem. Such animations sometimes affect other anims, making them incorrect. It there any way to make anims NULL, as it was in Spine2, after they are finished?
25 Dez 2016, 23:17
upd
Found quick and dirty bugfix for my problem, just calling this in Update().
void ClearCompleteNonLoopAnims() {
int MAX_TRACK = 6;
for (int i = 0; i < MAX_TRACK; i++) {
TrackEntry te = mySkeletonAnimation.state.GetCurrent(i);
if (te != null && !te.Loop && te.IsComplete) {
mySkeletonAnimation.state.ClearTrack(i);
}
}
}
Still a little bit unsure, why i did not need such code in older Spine, but at least i am not blocked by this issue anymore.