c6u2 I tried to print the debugging information, and the most suspicious thing currently is that both attach and move were called at the same time in the same second, although it appears to be the same second in the console,
"same second" is much too vague. Add a Time.FrameCount
to your debug output for example. You need to know exactly in which order things are called and what is called in the same frame. If your order of calls is:
frame 0: SetAnimation(0, idle, ..)
frame 20: SetAnimation(0, attack, ..)
frame 20: SetAnimation(0, idle, ..)
Then the call setting attack
in frame 20 is not having any effect, since it's immediately replaced with idle in the same frame. Attack will then never play.
c6u2 although it appears to be the same second in the console, I don't think it's possible to enter the function body at the same time.
If you call the method from multiple threads, then yes. On a single thread things are of course happening sequentially 🙂. It seems that you're having troubles with fundamentals of using Unity, programming and debugging in general. Please note that adding a layer of complexity on top by using Spine is likely making things more difficult and frustrating. It might be a more rewarding approach to first create a working prototype moving just a cube around via user input, and then adding more complex things like animation on top once things work as desired.