Search Unity

"Corner Grab" Resizing.

Discussion in 'UGUI & TextMesh Pro' started by AntonQvarfordt, Nov 17, 2014.

  1. AntonQvarfordt

    AntonQvarfordt

    Joined:
    Mar 14, 2013
    Posts:
    27
    Hey, I've been trying to come up with a good way to resize a panel by dragging corners with mouse, like you would a Windows or Mac OS window, but I havn't figured out anything that's good enough.

    What I've been doing so far is to increase the sizeDelta by the same amount ive moved the mouse since clicking the corner but it has several issues like scaling the whole thing and not just the corner, and I cant apply the same code to each corner and make it work.

    So what I want to do is this: Grab any corner and pull it out, increasing my panel.

    Can I access the same blue corner points that I have in the editor somehow? Because if I could do that I'd imagine I could just set that corner point to the same position my mouse is at while doing down click?

    Thanks in advance!
     
  2. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683