wagenheimer

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.
wagenheimer

Kickstarter Backer
Beiträge: 29

Nate

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?
Benutzeravatar
Nate

Nate
Beiträge: 7647

wagenheimer

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? =(
Dateianhänge
windowstore.jpg
wagenheimer

Kickstarter Backer
Beiträge: 29

Pharan

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
Benutzeravatar
Pharan

Pharan
Beiträge: 4547

wagenheimer

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?
wagenheimer

Kickstarter Backer
Beiträge: 29

Alimaggs

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
Alimaggs
Beiträge: 5

Pharan

Unity 5 changed the defines for Windows Modern apps. The recommendations above are now incorrect.

http://docs.unity3d.com/Manual/WindowsU ... s-faq.html

probably want UNITY_WSA
Benutzeravatar
Pharan

Pharan
Beiträge: 4547

wagenheimer

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?
wagenheimer

Kickstarter Backer
Beiträge: 29

Alimaggs

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

Mitch

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

Mitch
Beiträge: 966

wagenheimer

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.
wagenheimer

Kickstarter Backer
Beiträge: 29


wagenheimer

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

Anybody please make a definitive fix for the official runtimes.
wagenheimer

Kickstarter Backer
Beiträge: 29

Mitch

wagenheimer hat geschrieben: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.
Benutzeravatar
Mitch

Mitch
Beiträge: 966

foriero

Hello, any progress with this? UNITY_WSA is for sure usable also for WIN 10 builds.
foriero
Beiträge: 165


Zurück zu Runtimes