I made a custom pipeline made for Monogame since all my animations broke because of it, it works perfectly and it parses the .atlas as intended, however when the game runs no animation appears.
There are no examples for Monogame for 4.0 so I am not sure if I am missing something. Both runtimes were updated, spine-xna and spine-csharp up to 4.0
On LoadContent, loading everything:
logoAnimation = content.Load<SpineAsset>("Logo");
logoAnimation.SetAnimation(0, logoAnimation.SkeletonData.Animations.Items[0].Name, true);
logoAnimation.SetBasePosition(new Vector2(70, 100));
logoAnimation.SetActualPosition(new Vector2(70, 100));
logoAnimation.Skeleton.X += 70;
logoAnimation.Skeleton.Y += 100;
logoAnimation.Skeleton.UpdateWorldTransform();
On Update, I set the current scale and update the position if needed:
logoAnimation.SetScale(screenScale);
logoAnimation.UpdatePosition(screenScale);
logoAnimation.UpdateRoutine(gameTime);
public void UpdateRoutine(GameTime gameTime)
{
AnimationState.Update(gameTime.ElapsedGameTime.Milliseconds / 1000f);
AnimationState.Apply(Skeleton);
Skeleton.UpdateWorldTransform();
}
OnDraw, I render the skeleton:
skeletonRenderer.Begin();
skeletonRenderer.Draw(logoAnimation.Skeleton);
skeletonRenderer.End();
skeletonRenderer is properly initialized. Did anything change when rendering the animations?