Hello all,
I spent probably well over 8 hours trying to get the setup for my project working correctly and have gotten stalled on an exception that' been frustrating me. I wondered if anyone had ever encountered this problem before. Perhaps it's an easy fix that I'm just not seeing but perhaps not.
Firstly, is there a proper way to set up a project in Visual Studio '12 with Monogame in place of XNA that I could follow in case I'm missing something? I've gotten surprisingly far considering my slim resources but I'm still new to this.
Secondly, While I've gotten everything to appear to compile and run up to a point, when it first tries to render a spine object I get an exception of the following.
Inside SkeletonRenderer:
A first chance exception of type 'System.InvalidCastException' occurred in spine-xna.dll
An unhandled exception of type 'System.InvalidCastException' occurred in spine-xna.dll
Additional information: Unable to cast object of type 'Microsoft.Xna.Framework.Graphics.Texture2D' to type 'Spine.AtlasRegion'.
It occurs right here:
public void Draw (Skeleton skeleton) {
List<Slot> drawOrder = skeleton.DrawOrder;
for (int i = 0, n = drawOrder.Count; i < n; i++) {
Slot slot = drawOrder;
RegionAttachment regionAttachment = slot.Attachment as RegionAttachment;
if (regionAttachment != null) {
SpriteBatchItem item = batcher.CreateBatchItem();
AtlasRegion region = (AtlasRegion)regionAttachment.RendererObject; <
item.Texture = (Texture2D)region.page.rendererObject;
Has anyone ever seen this before?
Any help is greatly appreciated. Thanks