• EditorBugs
  • spine4.2 Unity / Addanimation covers the current animation name.

I'd like to get an animation name that's currently running. But I get an add animation name.

baseTrack = state.SetAnimation(0, "Anim_4_Play_2to3", false);
Debug.Log(baseTrack.AnimationEnd);
Debug.Log(baseTrack.Animation.Name);
baseTrack = state.AddAnimation(0, "Anim_4_Play_3", true, 0);
Debug.Log(baseTrack.Animation.Name)

Animation playback is normal.
setanimation start=> setanimation end => addaimation start;
However, animation.name changes as soon as you put addanimation into the code. 🙁

stateData.SetMix("Anim_4_Play_1", "Anim_4_Play_2", 1.0f);
stateData.SetMix("Anim_4_Play_2", "Anim_4_Play_2to3", 0.0f);
stateData.SetMix("Anim_4_Play_2to3", "Anim_4_Play_3", 0.0f);

The mix is also zero.🙁

Why!

Related Discussions
...

I want the result of Want.
But the result of the Current comes out. 🙁

I'm not from the Spine staff, so I may be wrong.

"state.GetCurrent(0).Animation.Name" would do the trick, I think ... I haven't tested it though

Edit :
It worked for me. I readed too fast your message trough, but the stat.GetCurrent worked.

  • Pentacles님이 이에 답장했습니다.
  • Misaki 님이 이 게시물을 좋아합니다..

    Pentacles
    I think the bug was just because when you do
    baseTrack = state.AddAnimation(0, "Anim_4_Play_3", true, 0);
    You changed the reference of TrackEntry "baseTrack" for the "Anim_4_Play_3" so when you ask its data it give you the data of Anim_4_Play_3

    • Gijun님이 이에 답장했습니다.
    • Nate 님이 이 게시물을 좋아합니다..

      Pentacles

      Thank you, and it works well! :
      I didn't have to make baseTrack! 🙂

      • NateHarald 님이 이 게시물을 좋아합니다..