Hi, I have purchased spine2.0 pro Yesterday.
I have trouble with import to Unity4.5.4.
Some animation are broken but I don't know what's going on.
This is movie of the animations on Unity.
https://dl.dropboxusercontent.com/u/757 ... mation.m4v
This is C# Script.
using UnityEngine;
using System.Collections;
using Spine;
using System;
public class SwitchAnimations : MonoBehaviour {
SkeletonAnimation skeletonAnimation;
SkeletonData skeletonData;
void Start () {
skeletonAnimation = GetComponent<SkeletonAnimation>();
}
void Update(){
if (Input.GetKeyUp (KeyCode.W)){
Reset();
skeletonAnimation.state.SetAnimation (0, "walk left", true);
}
if (Input.GetKeyUp (KeyCode.A)){
Reset();
skeletonAnimation.state.SetAnimation (0, "walk right", true);
}
if(Input.GetKeyUp (KeyCode.S)){
Reset();
skeletonAnimation.state.SetAnimation (0, "Sitdown-idle", true);
}
if(Input.GetKeyUp (KeyCode.R)){
Reset();
skeletonAnimation.state.SetAnimation (0, "walk-back-Right", true);
}
if(Input.GetKeyUp (KeyCode.L)){
Reset();
skeletonAnimation.state.SetAnimation (0, "walk-back-left", true);
}
}
void Reset(){
if (skeletonAnimation.skeletonDataAsset != null) {
if (skeletonAnimation.skeletonDataAsset.atlasAsset != null)
skeletonAnimation.skeletonDataAsset.atlasAsset.Reset();
skeletonAnimation.skeletonDataAsset.Reset();
}
skeletonAnimation.Reset();
}
}
Please give me any hints.
Thanks,