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:
- 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.
- Change target framework of the spine-csharp project to .NET 3.5 in order to be able to use build libraries in Unity.
- Create a new Class library (Windows store apps) project (e.g. spine-csharp-windowsstore).
- Copy the src folder from spine-csharp to spine-csharp-windowsstore.
- 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.
- Switch to the Release solution configuration in order to pass the WACK Debug configuration test later.
- Add the WINDOWS_STOREAPP compilation symbol to the spine-csharp-windowsstore project.
- Build the solution.
- Copy the spine-csharp.dll from the bin/Release folder of the spine-csharp project to your Unity Plugins folder.
- 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!