Alimaggs

  • 25 de Abr de 2015
  • Se unió 1 de Abr de 2015
  • Thank you so much, was really struggling with this, but your solution works! 🙂

    Really appreciate the help. Noticed a few other posts about this, unresolved, so hopefully this'll help them out too.

    Once again, really, really appreciate the help. So glad to have this game up and running.

  • That did it!! 🙂

    Thank you so much!

    Been trying to work around the issue for the past week or so!

    Really appreciate your help!

  • Hi,

    Did anybody ever find a workaround for using Spine to build a Windows Store app. Building to iOS, Android and Windows Phone works fine, but I'm trying to publish a game as a Universal Windows Store app and get the following errors...

    Assets\spine-csharp\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\Atlas.cs(71,59): error CS1503: Argument 1: cannot convert from 'string' to 'System.IO.Stream'

    Assets\spine-csharp\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\SkeletonJson.cs(76,50): error CS1503: Argument 1: cannot convert from 'string' to 'System.IO.Stream'

    You can recreate this by building any Spine/Unity project and changing the platform to Windows Store.

    I'm using Unity 4.5.5 here, but on another machine I'm running the latest version of Unity, Spine, and the Spine plug-ins and have the same issues.

    The issue here is to do with StreamReader. Below is the code from the Atlas.cs file. It's the same problem in the SkeletonJason.cs file.

     Loading Image

    #if WINDOWS_PHONE
                Stream stream = Microsoft.Xna.Framework.TitleContainer.OpenStream(path);
                using (StreamReader reader = new StreamReader(stream))
                {
    #else
                using (StreamReader reader = new StreamReader(path)) {   <
    
    ---
    
     
    #endif
                try {
                   Load(reader, Path.GetDirectoryName(path), textureLoader);
                } catch (Exception ex) {
                   throw new Exception("Error reading atlas file: " + path, ex);
                }
             }
          }
    #endif

    Thanks in advance for your help!

    Best wishes,
    Ali

  • I did try working through your steps, but stumbled.

    Although your method looks like the most elegant workaround, I'd be just as happy changing the code in the plug-ins.

    The lines of code that are causing the issues are to do with StreamReader.

    #if WINDOWS_PHONE
    Stream stream = Microsoft.Xna.Framework.TitleContainer.OpenStream(path);
    using (StreamReader reader = new StreamReader(stream))
    {
    #else


    &gt; using (StreamReader reader = new StreamReader(path)) {
    #endif
    try {
    Load(reader, Path.GetDirectoryName(path), textureLoader);
    } catch (Exception ex) {
    throw new Exception("Error reading atlas file: " + path, ex);
    }
    }
    }
    #endif

    Thanks so much for this, really appreciate any help you can give.

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

  • Did you get anywhere with this. I'm trying to crack it but not getting very far.

  • Hey,

    Sorry to be a bit cheeky but I'm struggling getting Spine working with Windows Store Apps. Is there any chance at all you could send me your solution as a zip or rar file? Really keen to crack this. Tried following your instructions but I got into a bit of a tangle and would REALLY appreciate any help you could give me.

    If you can, email ali@chaoscreated.co.uk. I'd so appreciate it.

    Thanks,
    Ali

  • No. Are you having the same issue?

    I upgraded to the latest Unity today, updated Spine, and the plug-ins, but still no luck.

  • 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