- Düzenlendi
Windows Store Universal 10 App build
Hi, guys
Did anyone successfully build a project as a universal 10 windows store app? I've tried but there're compile errors in Atlas.cs, SkeletonJSON.cs and SkeletonBinary.cs. I knew that there're old flags in them - WINDOWS_STOREAPP instead of UNITY_WSA, but when I replaced wrong with correct one I got errors starting with "using" section:
Error CS0234 The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) SpineTest.CSharp, C:\Users\Public\Documents\Unity Projects\SpineTest\Assets\spine-csharp\Atlas.cs, 38
Error CS0246 The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) SpineTest.CSharp C:\Users\Public\Documents\Unity Projects\SpineTest\Assets\spine-csharp\Atlas.cs, 39
Is it possible to fix that?
There's an experimental fix for that. You can download this branch and replace your current Spine install with it. https://github.com/EsotericSoftware/spine-runtimes/tree/unity-uwp-fix
The above excludes those parts with a compiler directive that's conditional on Unity's defines.
We haven't merged it into the master branch yet 'cause we don't have a test setup.
The sure way to fix it seems to be to remove parts of the code that Unity doesn't use at all (they're used by XNA/Monogame). Those errors just so happen to be coming from those parts. See this issue: https://github.com/EsotericSoftware/spine-runtimes/issues/495
If the above fix works for you, let us know!
Pharan yazdıIf the above fix works for you, let us know!
Thanks for the reply! Project now compiles but after Unity Logo and Spine Logo screens (I use Gunman asset pack for testing) all I see is a black screen. Everything else works: game, sounds - only graphics is missing. If I remove all spine objects from the scene graphics returns. This's on Lumia 1520 updated to Windows 10 Preview.
Any error logs? did you try their advice here? Can't build a Windows Store App with Unity (Errors)
Yes, I tried this solution but result is the same - black screen. However, I've tried to look through all the examples and found something: most of the examples work, except for Dragon and Basic Platformer. They show black screen. And Gunman, of course, doesn't work either.
Dragon expample throws some errors like this:
D3D11: Failed to create RenderTexture (256 x 256 fmt 87 aa 1), error 0x887a0005
(Filename: C:\buildslave\unity\build\Runtime/GfxDevice/d3d11/RenderTextureD3D11.cpp Line: 265)
and a lot of these (it throws them all the time while the app is running):
d3d11: failed to create index buffer of size 384 [0x887A0005]
Basic Platformer example throws again several errors like this:
D3D11: Failed to create RenderTexture (256 x 256 fmt 87 aa 1), error 0x887a0005
(Filename: C:\buildslave\unity\build\Runtime/GfxDevice/d3d11/RenderTextureD3D11.cpp Line: 265)
But Gunman gives just this:
The referenced script on this Behaviour (Game Object 'InControl') is missing!
(Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1655)
WARNING: Shader
Unsupported: 'Standard' - Pass 'FORWARD' has no vertex shaderWARNING: Shader
Unsupported: 'Standard' - Pass 'FORWARD_DELTA' has no vertex shaderWARNING: Shader
Unsupported: 'Standard' - Pass 'SHADOWCASTER' has no vertex shaderWARNING: Shader
Unsupported: 'Standard' - All passes removedUnloading 5 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 8.610677 ms
'Gunman.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\SharedData\PhoneTools\AppxLayouts\BoxTestVS.Release_ARM.ionra\System.Collections.NonGeneric.dll'. Cannot find or open the PDB file.
Unloading 0 Unused Serialized files (Serialized files now loaded: 0)Unloading 13 unused Assets to reduce memory usage. Loaded Objects now: 911. Operation took 43.020260 ms.
System memory in use: 8.8 MB.
Those scenes seem to be the ones using cast shadows.
There may be something weird going on with DirectX11 shaders and possibly IL2CPP shadows?
Are you using the IL2CPP platform or .NET?
These seem like Unity-side errors. We'll try to find a workaround and also report these errors to Unity.
Great, thank you!
I can confirm that. If I turn off casting shadows (receiving shadows is also off just in case) everything starts to work.
I use .NET for now.
Does it function correctly with .NET?
No, I just wanted to say that haven't tried IL2CPP yet so I don't know if it works there.
(Filename: C:\buildslave\unity\build\Runtime/GfxDevice/d3d11/RenderTextureD3D11.cpp Line: 265)
looks like it was writing out cpp code from UnityEngine so I figured it was because you were using IL2CPP.
Anyway, already sent a bug report to Unity. Now we wait.
10 Jan 2016 5:42 pm
Tried Build and Run
for Windows 10 UWP running on .NET.
It seemed to work fine for Basic Platformer.
Are you on some kind of special hardware? Intel graphics? A VM? Anything noteable?
Hm, can't say if local configuration influences target device. I have a notebook with i7-4710M, 16 GB Ram, Intel 4600 + Nvidia GTX 870M 6Gb GDDR5 and Windows 10 Pro. Target device I actully test on is Nokia Lumia 1520 with Snapdragon 800 and Adreno 330. And I don't use VM.
So was it only on the Lumia that it was turning black? or also on the notebook?
Yes , I've tested only on Lumia. I'm new to Unity so didn't even know that I can launch universal app on notebook. When I target Windows Store in build section I have "Build and run on" line grayed out and containing "Windows Phone", so I can't change the value.
PS: I've found out that if i switch to Universal 8.1 then I can change Local Machine and switch back to Universal 10. On notebook everything works right.
Just to recap, 'cause I want to resend a correct bug report to Unity:
Building for UWP, and running on a Lumia 1520 running Windows 10 Mobile.
The scenes with cast shadows turn black.
And the errors are
D3D11: Failed to create RenderTexture (256 x 256 fmt 87 aa 1), error 0x887a0005
(Filename: C:\buildslave\unity\build\Runtime/GfxDevice/d3d11/RenderTextureD3D11.cpp Line: 265)
and
d3d11: failed to create index buffer of size 384 [0x887A0005]
Is that right?
Yes, that's right
Is this now running? I receive the following errors on UWP:
Assets\Vendor\spine-csharp\SkeletonBinary.cs(96,27): error CS0246: The type or namespace name 'BufferedStream' could not be found (are you missing a using directive or an assembly reference?)
Assets\Vendor\spine-csharp\SkeletonJson.cs(81,41): error CS1503: Argument 1: cannot convert from 'string' to 'System.IO.Stream'
I saw something about an external fix, but the link is broken. Thanks
This should be fixed in the latest version.
You can also apply the changes shown here: [csharp] Fix SkeletonBinary/SkeletonJson for Unity-WSA.@1aa8f56