Class 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.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
AdaptationBase
Implements
Namespace: E7.NotchSolution
Assembly: E7.NotchSolution.dll
Syntax
[ExecuteAlways]
[RequireComponent(typeof(Animator))]
public abstract class AdaptationBase : MonoBehaviour, INotchSimulatorTarget
Remarks
You can create other kinds of adaptation component by subclassing this.
Properties
SafeAreaRelative
Provide safe area in 0~1 value related to the screen size, already taken account of simulated or runtime value.
Declaration
protected Rect SafeAreaRelative { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Rect |
Methods
Adapt()
Any adaptation component will be "adapted" only once on Start()
, but
this call could make that happen again on-demand.
Declaration
public abstract void Adapt()
Remarks
This should ended up calling Adapt(Single) somehow in the implementation.
Adapt(Single)
Drive UnityEngine.Animator with playable graph, based on a blend between the first frame of 2 UnityEngine.AnimationClip.
Declaration
protected void Adapt(float valueForAdaptationCurve)
Parameters
Type | Name | Description |
---|---|---|
System.Single |
valueForAdaptationCurve |
Adaptation curve evaluates this value into a 0-1 blend between 2 clips. |
Explicit Interface Implementations
INotchSimulatorTarget.SimulatorUpdate(Rect, Rect[])
Declaration
void INotchSimulatorTarget.SimulatorUpdate(Rect simulatedSafeAreaRelative, Rect[] simulatedCutoutsRelative)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Rect |
simulatedSafeAreaRelative |
|
UnityEngine.Rect[] |
simulatedCutoutsRelative |