Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

How to preview RectTransform as shown in videos

Discussion in 'UGUI & TextMesh Pro' started by andsee, Aug 22, 2014.

  1. andsee

    andsee

    Joined:
    Mar 20, 2012
    Posts:
    88
    I've noticed in the tutorial videos the ability to drag the edge of a RectTransform and view how it affects it's children and when you let go of the mouse button it springs back to where it should be defined by it's parent.

    However when I try this it does not preview it just changes the size, I must be missing a key press or some other mode toggle, anyone care to share some light here?

    You can see it in the following video:
    http://unity3d.com/learn/tutorials/modules/beginner/ui/rect-transform
     
  2. andsee

    andsee

    Joined:
    Mar 20, 2012
    Posts:
    88
    Ah, I've just worked it out. It so happens that the components I was trying it on shared an edge with it's parent so that when dragging I guess the code finds the component's edge before the parent's.

    It appears that it is only possible to preview if you can drag the parent's (of the currently selected item) edge without picking the selected item's edge.

    Perhaps holding a modifier key down here would be a good option. Perhaps there is one?
     
  3. Thormor

    Thormor

    Joined:
    Nov 22, 2012
    Posts:
    39
    I'll up this thread since this is a question I have as well...
     
  4. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,901
    We can't assign modifier keys to this, since all standard modifier keys (alt, shift, control/command) are already in use for other things. The parent preview resize is also not something we consider a crucial feature; it's just a neat little thing that can help in understand what the anchoring does while learning to understand it.

    The limitation that you can't use it when the rect edge is aligned with the parent rect edge is of course unfortunate, but it doesn't warrant making the feature more complicated (special non-standard modifier keys or modes) in order to work around it, I think.