Author Topic: GameObject disappear from Clipping ? How check it?  (Read 1426 times)

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
GameObject disappear from Clipping ? How check it?
« on: March 19, 2014, 10:17:56 PM »
Who could help me, i want to check gameobject which go out from a clip area in Panel with Clipping (determine a gameobject is disappear from Clip area)? now i have decision ,that is calculate the Y position of gameobject by
  1.  yPos = NGUIMath.CalculateRelativeWidgetBounds (_transform_of_clip_panel, item.gameobject.transform).center.y+deltaY;

then checking with Y bounds of clip area  in Update() . Maybe have a better way ?
thanks
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: GameObject disappear from Clipping ? How check it?
« Reply #1 on: March 20, 2014, 12:56:43 AM »
UIWidget.isVisible tells you whether it's visible or not. You don't need any bounds checks.