Author Topic: 3.0.9 f2 - Panel Clipping Issues  (Read 1548 times)

doggan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
3.0.9 f2 - Panel Clipping Issues
« on: January 20, 2014, 02:23:21 AM »
The following code that was added in 3.0.9 f2 in UIPanel.cs is causing weird clipping issues for me on some of my UIs. The panel has it's clipping set to None, but objects are still getting clipped.

  1. bool vis = forceVisible || (w.CalculateCumulativeAlpha(frame) > 0.001f && IsVisible(w));

Everything was working fine up to and including 3.0.9 f1, so I reverted the above code to the code below, and the problem was solved:

  1. bool vis = forceVisible ||
  2.         (mClipping == UIDrawCall.Clipping.None && !w.hideIfOffScreen) ||
  3.                 (w.CalculateCumulativeAlpha(frame) > 0.001f && IsVisible(w));

Is this a NGUI bug or is something not set up properly in my scene?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.0.9 f2 - Panel Clipping Issues
« Reply #1 on: January 20, 2014, 03:44:12 AM »
Probably best to make it:
  1. bool vis = forceVisible || (w.CalculateCumulativeAlpha(frame) > 0.001f &&
  2.         ((mClipping == UIDrawCall.Clipping.None && !w.hideIfOffScreen) || IsVisible(w)));