ClearFlags not working right on iOS

Getting to a point where I’m testing the game more and more on devices, right now I can’t figure out why ClearFlags isn’t quite working right.

On this video, up to 8 seconds in is loading and getting into the game, note the background which is a prefab with a little animated monster on.

17 seconds in: Here there are 3 cameras in operation. The lowest depth camera is still the main world camera, for display the 3D environment (terrain, npc’s, player etc…), set to depth 0.

At depth 9 there is an orthographic camera for just displaying the cards. The clearflags on this camera is set to DepthOnly with the near clip and far clip set so the cards can display and rotate freely.

At depth 10 there is the NGUI camera

By contrast, here is how it looks in editor:

I’ve tried lots so far to try and fix it, from trying different methods of ClearFlags and even manually calling GL.Clear on OnPreRender but no joy on anything I’ve tried so far. Any advice would be greatly appreciated!

Incase anyone ever comes across something similar in the future, I managed to sort this out by turning off GPU Skinning

Was wrong again about this. After finding the bug again, started looking at whether it could have been quality settings causing the issue as it only seemed to happen on maxed out settings. Not sure exactly which setting was causing the problem but now seem to have something that works.

1 Like