• Runtimes
  • UWP and Monogame support

Hello.
I've been trying to integrate Spine into a Monogame project on UWP.
I did it but I had to slightly change some lines of code in the runtime
Are there plans to support UWP in the future?
If not, are there plans to stop supporting Monogame?
Thank you for your answers.

Related Discussions
...

Could you tell me what you needed to change so that the Spine runtime works with UWP? We are happy to integrate it in the runtime if we can make it so the runtime continues to work outside of UWP as well.

5 Tage später

Sorry for the delay in my reply.
Anyway.
I had to replace all [Serializable] with

[DataContract]

. I'm not sure how this affects serialization since I usually use

[DataContract]

together with

[DataMember]

when I build WCF services.
Next was to change the Atlas class in the constructor

public Atlas (string path, TextureLoader textureLoader)

.
using

Microsoft.Xna.Framework.TitleContainer.OpenStream(path);

to get a stream since UWP no longer seems to support strings as a builder parameter.
I still haven't been able to perform an exhaustive test so I'm not sure if this will fail at runtime, but in principle it works.

I believe the Serializable annotations on ExposedList are Unity specific. The runtime itself doesn't use any serialization, so that change seems to be OK.

The spine-csharp is annotated with WINDOWS_PHONE guards. Did you pass that to the build? Because that will actually use Microsoft.Xna.Framework.TitleContainer.OpenStream(path) to get a stream. See spine-runtimes/Atlas.cs at 3.6

The [System.Serializable] attribute should have nothing to do with Unity. It was likely directly copied from the List(T) source or some older version. I think it might be harmless to remove it.

Nothing in spine-unity uses ExposedList serialization.

6 Tage später

This has been fixed in the 3.6, 3.7-beta and 3.7-beta-cpp branches.