2D Toolkit Forum
2D Toolkit => Support => Topic started by: stiv on July 26, 2013, 03:22:10 pm
-
Hi,
I've just tried running my project on a WP8 device for the first time and discovered that all my StaticSpriteBatchers do not display (there is just nothing there). If I click "Edit" on the SSB to bring all the objects underneath back and then run it again everything displays ok (but obviously not batched).
The problem seems isolated to the WP8 device, in the emulator everything appears correctly.
I am using Unity 4.2.0f4 on Win8 and 2D Toolkit v2.0 Final + Hotfix 2
Any suggestions would be really appreciated. Happy to provide more info I'm just not sure what is useful.
Cheers,
Steve
-
We've managed to repro, but not got to the bottom of this. The debugger is hopeless - it just lies about values all the time making it useless to work out whats going wrong. Debugging with prints takes a long time.
Edit: There is no ETA for a fix yet.
-
Thanks for looking into it, I'm kinda happy that it isn't just me.
I guess I'll just stop using them until a fix is available.
Cheers
-
Well you could use it, but leave it in the non-committed state. That will cover you for now.
-
Is there any fix for this? Besides leaving the batcher uncommited.
-
Not yet. I'm waiting for them to improve the debugger stuff slightly - already spent half a day on this and without a proper debugger (it currently just lies about stuff) it will take absolutely AGES to debug. Theres a new version out soon - hopefully they fix it then?
-
Hi, have you figure out this issue? I can confirm that issue persists in v 2.20 final + hotfix 0.
Not committing the batch seems to be a temporary solution, but it is significantly impacting draw calls.
-
There is one workaround, but I'd rather not suggest that at the moment. I'm investigating this again - hopefully debugging works this time round and I'll get further...
-
After investigating this we've found that the issue is caused by a really nasty bug in Unity. It seems to be present on WP8 builds in 4.2.x, and we've filed a bug report with them (#568206 if you need to help convince them to fix it quicker).
This also affects Windows Store Apps.
In tk2dStaticSpriteBatcher.Awake, add the following lines:
void Awake()
{
#if UNITY_WP8 || UNITY_METRO
if (!Application.isEditor)
{
foreach (var bs in batchedSprites)
{
bs.relativeMatrix = bs.relativeMatrix.transpose;
}
}
#endif
Build();
}
Due to the nature of the Unity bug, we can't release a proper bug fix. We'll add a Debug.LogError when building on Windows Phone 8 linking to this forum thread so people are aware of it until Unity fix it properly.