Class NestedBlendSource
Blend result source for blending. This exposes a CinemachineBlend object as an ersatz virtual camera for the purposes of blending. This achieves the purpose of blending the result oif a blend.
Implements
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
public class NestedBlendSource : ICinemachineCamera
Constructors
NestedBlendSource(CinemachineBlend)
Contructor to wrap a CinemachineBlend object
Declaration
public NestedBlendSource(CinemachineBlend blend)
Parameters
Type | Name | Description |
---|---|---|
CinemachineBlend | blend | The blend to wrap. |
Properties
Blend
The CinemachineBlend object being wrapped.
Declaration
public CinemachineBlend Blend { get; }
Property Value
Type | Description |
---|---|
CinemachineBlend |
Description
Gets a brief debug description of this camera, for use when displaying debug info
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
string |
IsValid
Will return false if this references a deleted object
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets the name of this virtual camera. For use when deciding how to blend to or from this camera
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
ParentCamera
Returns the ICinemachineMixer within which this Camera is nested, or null.
Declaration
public ICinemachineMixer ParentCamera { get; }
Property Value
Type | Description |
---|---|
ICinemachineMixer |
State
Camera state at the current time.
Declaration
public CameraState State { get; }
Property Value
Type | Description |
---|---|
CameraState |
Methods
OnCameraActivated(ActivationEventParams)
Notification that this camera is being activated. This is sent to the newly activated camera.
Multiple camera may be active simultaneously for a while, if blending.
evt.IncomingCamera will always be "this".
Declaration
public void OnCameraActivated(ICinemachineCamera.ActivationEventParams evt)
Parameters
Type | Name | Description |
---|---|---|
ICinemachineCamera.ActivationEventParams | evt | Context for the camera activation. |
UpdateCameraState(Vector3, float)
Update the camera's state. The implementation must guarantee against multiple calls per frame, and should use CinemachineCore.UpdateVirtualCamera(ICinemachineCamera, Vector3, float), which has protection against multiple calls per frame.
Declaration
public void UpdateCameraState(Vector3 worldUp, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | worldUp | Default world Up, set by the CinemachineBrain |
float | deltaTime | Delta time for time-based effects (ignore if less than 0) |