Author Topic: UIPanel clipping went haywire  (Read 3174 times)

Nicky

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
UIPanel clipping went haywire
« on: March 12, 2014, 01:28:06 AM »
All NGUI GameObjects under my UIPanels failed to display properly when any clipping is defined. Any UISprite or UILabel under the UIPanel would be displayed as a solid block until I remove clipping on the parent UIPanel.

This used to work perfectly until I was fiddling with some 3D assets (mostly textures and shaders) and project settings for optimization for mobile. But it was too many and I could not figure out what caused it.

Starting new scene had same problem.
Restarting Unity had same problem.
Restarting new project was did not have the problem.

Before I have to restart the entire project or undo all the optimizations... would anyone know what setting could have caused this? A faulty shader? Everything else works fine.

Thanks in advance!

Nicky

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UIPanel clipping went haywire
« Reply #1 on: March 12, 2014, 01:29:53 AM »
I also tried reinstalling the latest version of NGUI. Seems to be something else in the project settings.

Nicky

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UIPanel clipping went haywire
« Reply #2 on: March 12, 2014, 01:34:46 AM »
Had a stray line when I was experimenting with the globalMaximumLOD and forgot to remove it.

  1. Shader.globalMaximumLOD = 100;

Removed this and it was fixed.

Weird that the problem was showing up in the editor without this code running at all.