kot14217

ERROR: 'TrackEntry' does not contain a definition for 'timeScale' and no accessible extension method 'timeScale' accepting a first argument of type 'TrackEntry' could be found (are you missing a using directive or an assembly reference?)

public void SetAnimation(AnimationReferenceAsset animation, bool loop, float timeScale)
{
if (animation.name.Equals(currentAnimation))
{
return;
}
Spine.TrackEntry animationEntry = skeletonAnimation.state.SetAnimation(0, animation, loop);
animationEntry.timeScale = timeScale; <<<=======ERROR
animationEntry.Complete += animationEntry_Complete;
currentAnimation = animation.name;
}
private void animationEntry_Complete(Spine.TrackEntry trackEntry)
{
if (currentState.Equals("Jumping"))
{
SetCharacterState(previousState);
}
}

public void SetCharacterState(string state)
{
if (state.Equals("Run"))
{
SetAnimation(run, true, 2f);
}
else if (state.Equals("Jumping"))
{
SetAnimation(jumping, false, 1f);
}
else
{
SetAnimation(idle, true, 1f);
}

currentState = state;
}
kot14217
  • Postovi: 8

Mario

You need to use the accessor TrackEntry.TimeScale instead of the internal TrackEntry.timeScale internal field.
Avatar
Mario

Mario
  • Postovi: 3033


Natrag na Unity