• RuntimesUnity
  • SetAnimation TimeScale and MixDuration problem

public void _AsyncAnimation(int animTrack, AnimationReferenceAsset animClip, bool loop, float timeScale, float mixDuration) 
    {
        if(animClip.name.Equals(CurrentAnimation[animTrack])) {
            return;
        }
        var setAnim = skeletonAnimation.state.SetAnimation(animTrack, animClip, loop);
        setAnim.TimeScale = timeScale;
        setAnim.MixDuration = mixDuration;
        CurrentAnimation[animTrack] = animClip.name;
    }

I was using this _AsyncAnimation code really well, but suddenly it was broken. I think that while I was using Visual Studio, something automatically changed, and this error happens:

I don't understand why this error is happening, because I was using this script bug-free for about 2 months.

Related Discussions
...

@HyperBlaze The error message reads that setAnim is of type object instead of TrackEntry, which is wrong and very strange. Are these the first (top-most) error messages that appear in the console window? If so, it is likely an issue of corrupted Unity project state, or an unresolved package dependency. Have you tried re-importing the project, or selecting Assets - Open C# Project, or deleting the Library directory? How did you import the spine-unity runtime, via the Unity Package Manager, or via unitypackage?