• Runtimes
  • Unity and some weird Loop problems

Related Discussions
...

Hi,
I have updated to the latest C# and Unity runtimes and I have some really weird loop issues. I setup my states through..
state.SetAnimation and state.AddAnimation. And for some reason SetAnimation does not respect the loop options I give it, I think the loop in the Inspector of the SkeletonAnimation is overwriting it in some weird way. Does anybody have the same problem?

I am also exporting from the latest 2.0.15 version of Spine.

Kamen


Here is an example, if I set this script but I have loop set to false in the Inspector. The animation won't loop, even though I give it a loop true state.

public class TempScript : MonoBehaviour {

   private SkeletonAnimation skeleton;

   void Awake() {
      skeleton = GetComponent<SkeletonAnimation>();
   }

   // Use this for initialization
   void Start () {
      skeleton.state.SetAnimation(0, "animation", true);
   }
   
// Update is called once per frame void Update () {
} }

I've had issues with the animations and their looping as well since 2.0, in your example are you saying that "animation" only plays once, and doesn't loop?

Great, thanks for the quick reaction!