Author Topic: Draggable Panel Contents and UIAnchor issue  (Read 4149 times)

Donkey111

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 16
    • View Profile
Draggable Panel Contents and UIAnchor issue
« on: August 22, 2013, 05:43:48 PM »
I've set up a horizontal draggable panel that works correctly. I'm now setting up an anchor. When I put the draggable panel into the center anchor and run the game everything works fine! Until I try to scroll through the list. When I scroll, the draggable contents go way far outside the clippable range... They essentially disappear with the slightest movement.

I have  my hierarchy set up like this:

-FrontEnd(UIPanel)
   -Camera
        -Center Anchor
            -Offset
               -UI Panel / UI draggable panel
                   -Grid
                         -Option 1
                         -Option 2
                         -Option 3
                         -etc.

I've tried getting rid of the offset (I don't need an offset really) and that didn't help. As soon as I delete the anchor it works fine again. I've searched for this particular issue and couldn't find anything. Any suggestions?

Donkey111

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Draggable Panel Contents and UIAnchor issue
« Reply #1 on: August 23, 2013, 11:12:20 AM »
I've tried playing with all the anchor variables and using different draggable panels. For now, I've come to the conclusion that anchors and draggable panels don't mix. Unless anyone has suggestions???

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel Contents and UIAnchor issue
« Reply #2 on: August 23, 2013, 01:50:06 PM »
Center-anchor outside your draggable panel has nothing to do with it. Double check your setup compared to what I have in the examples, and pay close attention to the drag constraints set on the draggable panel script.

Donkey111

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Draggable Panel Contents and UIAnchor issue
« Reply #3 on: August 23, 2013, 02:46:50 PM »
Yes, you were right. I tried dropping it on an empty gameobject and had similar results. Somehow when I created the anchor the scale was not set to 1, 1, 1 (it was at 360,360). So when I dropped my stuff in, all the scales adjusted and it screwed everything up.

Thanks and sorry for the dumb question.