Rect Transform - Unity Official Tutorials

Unity · 141K views · 2014 · 14:11

Open on YouTube

Game programming & enginesIndie game developmenttutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering Unity UI questions about anchors, scaling and sizing, since it explains how Rect Transform behaves.

Recommended by 2 people across 2 different months, 2018 to 2021.

What it is

An official Unity tutorial that explains the Rect Transform, the component that positions every UI element inside a Canvas. It covers positioning, anchoring, pivots and sizing, and is presented by the Unity team on the official Unity channel.

What people said

Recommends Naresh Bisht · 2019-03 · Stack Overflow · on “How to setup a shopping based UI for different screen sizes in unity?”

Actually, u don't need to change the match size. what u actually have to use are anchors. If u use anchors no matter how the size of the screen changes the UI element will resize with it. see this video from unity officials. It will definitely solve ur issue. [this video] thank you. U can accept this answer if this solves ur issue.

Recommends Hassan Omar · 2020-10 · Stack Overflow · on “Why there is a difference in the text size when show it in one Text ui and another Text ui with the same settings?”

This due to Scaling Rect Transform Component to solve this don't scale up or scale down UI Elements {Image ,Text, ... just keep Scale 1,1,1 } First I recommend You to see This to understand this Component [this video] Now to Solve your problem Set Scale of Description Image (1,1,1) Set Scale of Description Text (1,1,1) Do 1,2 with Scene Image, Scene Text Change Width , Height of{Description Text, Scene Text} with small values 900*400

Cites Marco Antonio · 2018-03 · Stack Overflow · on “How to calculate sizeDelta in RectTransform?”

sizeDelta: If you made a search, and end up here for an explanation of what sizeDelta means, like GetComponent().sizeDelta.y, then clear your mind. Visualize a small PANEL, resting on top of a big CANVAS, it's Parent object. In the PANEL's Rect Transform component, there are 2 rectangles defined: (a) The rectangle defined by its Anchors. Those triangles. Normally related to the Parent Object location and dimensions, in this case the CANVAS. (b) The rectangle defined by its own size, the PANEL's own dimension. sizeDelta = (b) - (a) That's it. Because normally an interactive component like a Button, smaller in size compared to the object where it rests, like a Panel, and because of that, norma

Cites Umikali · 2021-11 · Stack Overflow · on “Little white box in Unity”

i found the problem. the button had a parent that limited the RectTransform. I've changed the parent into a completly diffrent canvas, and it worked. I found the answer on this tutorial: [this video] .