Show / Hide Table of Contents

Namespace E7.NotchSolution

Classes

AdaptationBase

A base class which use the first frame of 2 UnityEngine.AnimationClip, and a blend value, to control an UnityEngine.Animator with Playables API once on Start(). Those information are all in E7.NotchSolution.BlendedClipsAdaptor serialized together with this class.

AspectRatioAdaptation

Like SafeAdaptation but use the current screen aspect ratio number instead. The ratio is width/height ratio when on landscape orientation (e.g. 4/3, 16/9, 2/1) regardless of your game's orientation.

NotchSolutionUIBehaviourBase

A base class to derive from if you want to make a notch-aware UnityEngine.EventSystems.UIBehaviour component. UpdateRect() will be called at the "correct moment". You change the rectTransform as you like in there.

NotchSolutionUtility

Helper methods for Notch Solution's components.

SafeAdaptation

Adapt anything according to how much a screen space was taken by a single side of safe area.

It uses Playables API and animation playables to blend between the first frame of 2 UnityEngine.AnimationClip, which represent normal state and fully-adapted state. As long as something is keyable by the animation system, it could be adapted to the safe area.

SafePadding

Make the UnityEngine.RectTransform of object with this component driven into full stretch to its immediate parent, then apply padding according to device's reported UnityEngine.Screen.safeArea.

Therefore makes an area inside this object safe for input-receiving components. Then it is possible to make other objects safe area responsive by anchoring their positions to this object's edges while being a child object.

Interfaces

INotchSimulatorTarget

Put it on any component to make it receive simulation calls from the Notch Simulator. Because in editor UnityEngine.Screen API is useless, instead we could receive some simulated values depending on what we have selected.

In This Article
Back to top
A Unity plugin by 5argon from Exceed7 Experiments. Problems/suggestions/contact : 5argon@exceed7.com Discord