Struct CinemachineBlendDefinition
Definition of a Camera blend. This struct holds the information necessary to generate a suitable AnimationCurve for a Cinemachine Blend.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[Serializable]
public struct CinemachineBlendDefinition
Constructors
CinemachineBlendDefinition(Styles, float)
Constructor
Declaration
public CinemachineBlendDefinition(CinemachineBlendDefinition.Styles style, float time)
Parameters
Type | Name | Description |
---|---|---|
CinemachineBlendDefinition.Styles | style | The shape of the blend curve. |
float | time | The duration (in seconds) of the blend |
Fields
CustomCurve
A user-defined AnimationCurve, used only if style is Custom. Curve MUST be normalized, i.e. time range [0...1], value range [0...1].
Declaration
[FormerlySerializedAs("m_CustomCurve")]
public AnimationCurve CustomCurve
Field Value
Type | Description |
---|---|
AnimationCurve |
Style
The shape of the blend curve.
Declaration
[Tooltip("Shape of the blend curve")]
[FormerlySerializedAs("m_Style")]
public CinemachineBlendDefinition.Styles Style
Field Value
Type | Description |
---|---|
CinemachineBlendDefinition.Styles |
Time
The duration (in seconds) of the blend, if not a cut.
If style is a cut, then this value is ignored.
Declaration
[Tooltip("Duration of the blend, in seconds")]
[FormerlySerializedAs("m_Time")]
public float Time
Field Value
Type | Description |
---|---|
float |
Properties
BlendCurve
A normalized AnimationCurve specifying the interpolation curve for this camera blend. Y-axis values must be in range [0,1] (internally clamped within Blender) and time must be in range of [0, 1].
Declaration
public AnimationCurve BlendCurve { get; }
Property Value
Type | Description |
---|---|
AnimationCurve |
BlendTime
Get the duration of the blend, in seconds. Will return 0 if blend style is a cut.
Declaration
public float BlendTime { get; }
Property Value
Type | Description |
---|---|
float |