Interface ICinemachineCamera
An abstract representation of a virtual camera which lives within the Unity scene
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
public interface ICinemachineCamera
Properties
Description
Gets a brief debug description of this camera, for use when displaying debug info
Declaration
string Description { get; }
Property Value
Type | Description |
---|---|
string |
IsValid
Will return false if this references a deleted object
Declaration
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
string Name { get; }
Property Value
Type | Description |
---|---|
string |
ParentCamera
Returns the ICinemachineMixer within which this Camera is nested, or null.
Declaration
ICinemachineMixer ParentCamera { get; }
Property Value
Type | Description |
---|---|
ICinemachineMixer |
State
Camera state at the current time.
Declaration
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
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
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) |