Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bounding boxes

Discussion in 'UGUI & TextMesh Pro' started by Whippets, Aug 23, 2014.

  1. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I'm trying to keep a draggable UI element within the bounds of of the canvas, but getting lost with all the Rect/RectTransform bounding volumes. Which is the correct one to use
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    I would look into anchoredPosition. Check the scripting reference for more information.