npruehs

  • 15. tra. 2015
  • Pridružuje se 10. sij. 2014
  • Hey Ali,

    I've answered your thread. Let me know if it works for you!

    Cheers!
    Nick

  • Hey Ali,

    actually, you can just comment these out in your case. These are part of the generic spine-csharp framework, and are not used by the Unity plugin. The AtlasAsset script uses the Atlas(TextReader reader, String dir, TextureLoader textureLoader) constructor instead, for instance, passing the text from the Unity text asset file.

    I've just verified that commenting out the methods

    Atlas.Atlas(String path, TextureLoader textureLoader)
    SkeletonBinary.ReadSkeletonData(String path)
    SkeletonJson.ReadSkeletonData(String path)

    makes the Dragon.unity test scene still work fine in Unity 5.0.0f4, and allows you to build Windows Store Universal 8.1 apps.

    Cheers!
    Nick

  • Hey Ali,

    I'd love to provide you with a solution! However, it's been quite some time I've been working on that project.

    Why don't you answer the thread or create a new one, describing your actual problem in detail? Send me the link and I'll help you, but this way, everybody else gets the solution as well 🙂

    Cheers!
    Nick

  • I think it's basically because Unity doesn't define the compilation symbols you are using for multi-platform development:

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

    This line shouldn't be even compiled for Windows Store apps, because of which you already wrapped it with an "#if WINDOWS_STOREAPP".

    I chose the above approach with building the whole project into .dlls because I didn't want to figure out all affected parts of the code, but instead rely on your work and use your compilation symbols 😉

  • Hey everybody,

    I just tried to add Spine to our Unity Windows Store app with the instructions provided at https://github.com/EsotericSoftware/spi ... pine-unity, and while the game was running fine in the editor, building the player failed. The reason for this is that Unity doesn’t provide the correct compilation symbols for the imported C# scripts.

    For me, the following workaround helped successfully building a Windows Store player that passes WACK:

    1. Don’t copy spine-csharp/src to your Unity project as specified by the instructions of the readme file, but instead open the spine-csharp solution file in Visual Studio.
    2. Change target framework of the spine-csharp project to .NET 3.5 in order to be able to use build libraries in Unity.
    3. Create a new Class library (Windows store apps) project (e.g. spine-csharp-windowsstore).
    4. Copy the src folder from spine-csharp to spine-csharp-windowsstore.
    5. In the Properties window of the spine-csharp-windowsstore project, set the assembly name and default namespace of the to the same values as in spine-csharp.
    6. Switch to the Release solution configuration in order to pass the WACK Debug configuration test later.
    7. Add the WINDOWS_STOREAPP compilation symbol to the spine-csharp-windowsstore project.
    8. Build the solution.
    9. Copy the spine-csharp.dll from the bin/Release folder of the spine-csharp project to your Unity Plugins folder.
    10. Copy the spine-csharp.dll from the bin/Release folder of the spine-csharp-windowsstore project to your Unity Plugins\Metro folder. This will make Unity choose the Windows Store-specific implementation of Spine when building the player.

    Hope that helps others who are as eager to use Spine on their Windows Store game as we are.

    Cheers!