The example project has a collider in there to test for mousedown. I was playing around with Unity a bit the other day and ended up changing the code a bit. It's nothing fancy, but this just allows you to press a key on your keyboard to trigger an animation instead. It still doesn't move the character around but I thought I'd share anyways.
using UnityEngine;
using System.Collections;
using Spine;
using System;
public class spineboy : MonoBehaviour {
SkeletonAnimation skeletonAnimation;
SkeletonData skeletonData;
public void Start () {
// Get the SkeletonAnimation component for the GameObject this script is attached to.
skeletonAnimation = GetComponent<SkeletonAnimation>();
skeletonAnimation.state.SetAnimation (0, "run", true);
}
public void Event (Spine.AnimationState state, int trackIndex, Spine.Event e) {
//Debug.Log(trackIndex + " " + state.GetCurrent(trackIndex) + ": event " + e + ", " + e.Int);
}
public void Update()
{
if (Input.GetKeyUp (KeyCode.Space)) {
skeletonAnimation.state.SetAnimation (0, "jump", false);
skeletonAnimation.state.AddAnimation (0, "run", true, 0);
}
}
}