Author Topic: move UISprite in/out soft clipped panel  (Read 4296 times)

simon129

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 20
    • View Profile
move UISprite in/out soft clipped panel
« on: July 09, 2012, 09:59:44 PM »
I have a soft clipped panel, and some UISprite inside, I have an animation to move these sprite outside the panel, so i change their transform.parent and position, but they seem to be clipped.

should i change their shader before move out ?

any idea ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: move UISprite in/out soft clipped panel
« Reply #1 on: July 10, 2012, 01:52:04 AM »
You need to call Refresh() on the widgets you removed, I believe. Check the Drag & Drop demo, I did something like that there right after moving the dragged widget outside of its original parent panel.

simon129

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 20
    • View Profile
Re: move UISprite in/out soft clipped panel
« Reply #2 on: July 10, 2012, 05:58:05 AM »
I figure it out, it's in the Drag & Drop demo, DragDropItem.cs line:87, UIWidget.CheckParent()

thanks, ArenMook.