Game Development Reference
In-Depth Information
° When the
Aspect Ratio
=
1
, the
Rect Transform
of the GameObject
will match the parent
Rect Transform
area
° When the
Aspect Ratio
is greater than
1
, it will make the
Height
of the
Rect Transform
proportional to the parents
Rect Transform
based on the
Aspect Ratio
, as shown here:
Rect Transform drawn based on aspect ratio height
•
Envelope Parent
: The
Envelope Parent
mode is the same as the
Fit In Parent
mode with one obvious exception, instead of working within the parent
Rect
Transform
, it applies its logic to be outside the parent
Rect Transform
. So
instead of working inwards, it work outwards from the parent. The effects of
the
Aspect Ratio
are the same, just in reverse.
I personally struggled for the use case behind the
Aspect Ratio
Fitter
but there must be one. For the best use of this
Fitter
, I suggest
you play with the settings if you find a need for this style of fitter.
Scroll Rect
When a layout group needs to be larger than the display can handle is where
Scroll
Rect
comes in. This provides the user with an area that they can interact with that
gives the scrolling capability to the selected Rect Transform content, for example:
1.
Add a
Canvas
to the scene (
Create
|
UI
|
Canvas
) or use one that you
already have.
2.
Right-click the
Canvas
and select
Create Empty
to add an Empty
GameObject to the
Canvas
as a child.
3.
Rename the new
Empty
GameObject to
ScrollRectArea
.