For a bit of background, we use your application to create animations for our games, which primarily are made in HTML5 / Javascript. However, we are looking to port one of our existing games over to MonoGame in order to build an Android and iOS app. I haven't got as far as looking into iOS, to start I'd just like to get a spine animation displaying on Android.
I ran into a few problems with loading the files, which wasn't too bad to get around by simply extending Atlas and SkeletonJson and ensuring the load functions used the correct API for Android. All good with a spine animation from the game, it loaded my files no problem, but nothing displayed. I decided to try using the example spine files from the MonoGame example (worked on PC no problem when I tested). So I made sure I used the same code and files as the example (with the exception of my extended classes).
I now get an error on json.readSkeletonData() , which is identical except for an overridden readSkeleton method, which then calls the base method.
public override SkeletonData ReadSkeletonData(string path)
{
using (StreamReader reader = new StreamReader(Game.Activity.Assets.Open(path)))
{
SkeletonData skeletonData = ReadSkeletonData(reader);
skeletonData.Name = Path.GetFileNameWithoutExtension(path);
return skeletonData;
}
}
The error log :
System.Exception: Error reading attachment: coin-front-shine-logo, skin: default
If I did something wrong in extending the base classes I don't see where because it fails in the method in the base class and uses very little custom code. It seems to fail at some point in the overloaded method. With some files it throws the exception on reading the attachment as here (seems to be related to reading the skins), and on others it will fail else where such as on reading the first animation.
I'm sure it must be pretty common for people to build native mobile games with spine outside of Unity / Unreal. MonoGame being cross-platform it seems to be one of the main alternatives. Does anyone have any experience or can point me to an example?
Also should we expect the XNA/MonoGame runtime to support mobile out the box? I see in the source code Windows mobile support (which of course hardly anyone uses), yet no android / ios. I appreciate this is probably due to the runtime actually being for XNA and not MonoGame, it just doesn't seem very useful.