You will be using these components to solve notch problems. Currently they are categorized into 2 categories.
RectTransform tree of the uGUI component system.
- SafePadding: pad the
RectTransformin based on the value returned by
Screen.safeArea. If you anchor any child on its padded edges, then you are automatically safe.
SafePosition: Controls only the
RectTransformsuch that it avoids both unsafe area and cutouts, by moving away perpendicularly from any selected edge. This is to be the first component that supports cutouts API introduced in 2019.2, but it works with 2019.1 too by trusting only the safe area.
EdgeSplit: In contrary to
SafePosition's perpendicular notch avoiding, this component try to solve the problem by moving in parallel along any selected edge. It controls both
RectTransformsuch that they can split or join together depending on cutout position of the device. (Imagine splitted on iPhone X but joining on Galaxy S10+) This requires 2019.2, it will do nothing without cutout API.
They are based on using Playables API to control
GameObject with animation playables, therefore utilizing
AnimationClip instead of
- AspectRatioAdaptation: Dynamically changes anything keyable by animation system, based on the ratio of the screen.
- SafeAdaptation: Dynamically changes anything keyable by animation system, based on the safe area.
In the far far future (2021.1+) when the runtime
UIElements is available, likely I will have to develop a UIE version of everything..