• Runtimes
  • [Unity] Build for Windows Store

I cannot build for Windows Store. Any suggestion?

Assets\spine-csharp\src\Atlas.cs(71,42): error CS1502: The best overloaded method match for 'System.IO.StreamReader.StreamReader(System.IO.Stream)' has some invalid arguments

Assets\spine-csharp\src\Atlas.cs(71,59): error CS1503: Argument 1: cannot convert from 'string' to 'System.IO.Stream'

Assets\spine-csharp\src\SkeletonJson.cs(76,33): error CS1502: The best overloaded method match for 'System.IO.StreamReader.StreamReader(System.IO.Stream)' has some invalid arguments

Assets\spine-csharp\src\SkeletonJson.cs(76,50): error CS1503: Argument 1: cannot convert from 'string' to 'System.IO.Stream'


There is some problem with the #if #else!

Even if it enters on #if WINDOWS_STOREAPP it also enters on the #else of the #if WINDOWS_PHONE, because of this it does not works. This is very strange.


Any advice? It should be something simple to fix but I could not make it work.

Related Discussions
...

Why is new StreamReader(String) an error? It seems to expect String to be a System.IO.Stream. Are you building for Windows Phone? If so, why isn't #if WINDOWS_PHONE true?

15 jours plus tard

I'm building for Windows Store! Please switch your platform to Windows Store and try to compile anything using Spine.


No fix for it yet? =(

Maybe it works as is but has a different flag for Windows Store/Modern Apps.

What version of Unity are you using now?
Try replacing #if WINDOWS_PHONE
with #if (WINDOWS_PHONE || UNITY_WP8 || UNITY_METRO || UNITY_WINRT)

Got my hands full at the moment. I can try to look into it over the weekend if nobody else does.

More info here: http://docs.unity3d.com/Manual/Platform ... ation.html

6 jours plus tard

I wasn't still able to fix it! Sorry for asking again, but could you please take a look?


Strange!
I removed a lot of code from SkeletonData and Atlas, just to be able to compile... and everything seems to be working good, my spine animations are still playing. Is this expected? These classes are only for Design Time?

4 mois plus tard

Hi, did you managed to get this working? I'm having the same issue here.

Building for Windows Phone works just fine, but as a Windows Store app I'm getting the same errors.

Ali

8 jours plus tard

4 months later, I downloaded all again from GitHub, but I still was not able to make it work!

Please somebody with enough knowledge could please update it make it work as expected?

Struggling with the same issue here too. Really keen to publish as a Universal/Windows Store app, but running against the same problems.

You guys know more about windows store than I do, I assure you. I'm an android/iOS unity dev.

5 jours plus tard

I think I was able to make it work!

I changed all #if WINDOWS_STOREAPP to #if NETFX_CORE and commented some code on SkeletonBinary.cs (BufferedStream seems to not exists on Windows Store)

/*
using (var input = new BufferedStream(await folder.GetFileAsync(path).AsTask().ConfigureAwait(false))) {
            SkeletonData skeletonData = ReadSkeletonData(input);
            skeletonData.Name = Path.GetFileNameWithoutExtension(path);
            return skeletonData;
         }
*/
return null;

Not the recommended fix, but now I can compile! I will test the final result and report if it worked.

Please do update us.

un mois plus tard

It worked! Compiled and working on Windows Store and Windows Phone.

Anybody please make a definitive fix for the official runtimes.

wagenheimer a écrit

It worked! Compiled and working on Windows Store and Windows Phone.

Anybody please make a definitive fix for the official runtimes.

Sounds like you just volunteered.

un mois plus tard

Hello, any progress with this? UNITY_WSA is for sure usable also for WIN 10 builds.