Author Topic: Help! Texture error on iOS  (Read 3961 times)

tr1stan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Help! Texture error on iOS
« on: October 05, 2012, 01:21:01 AM »
Hi,

I'm using NGUI 2.2.0 with Unity 3.5.6. I quite enjoy the workflow of NGUI and everything is perfect until I encountered this issue:

I have two scenes which include a menu scene created by NGUI and a game scene. I start with the menu scene and load the game scene afterwards, then if I return to the menu scene all GUI under the table or grid are missing textures. I have an screenshot bellow.

And it's weird that it only on those dynamically sorted elements, like items under a table or a grid. The others are OK. And it only occurs on iOS devices, on Unity editor it's also fine.

Please help me to resolve this.

Thanks

tr1stan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Help! Texture error on iOS
« Reply #1 on: October 05, 2012, 03:51:32 AM »
I have figured it out myself. In my game scene I have a script to set the LOD of all shaders to 200, via Shader.maximumLOD = 200.So the NGUI material can't display textures properly because of missing shader.

But I believe in my NGUI scene I only created one altas and I only use one shader, that is the Unlit/TransparentColored shader, which is LOD 100. So it looks like those spites attached to tables and grids are automatically using a different shader. Where can I find it?

mdeletrain

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 71
    • View Profile
Re: Help! Texture error on iOS
« Reply #2 on: October 05, 2012, 05:45:23 AM »
If you use packed textures, or clipping, or both, LOD level becomes 200.
In those case the shader that NGUI uses is automatically selected changing it's name (look at the shader folder in NGUI's resources).