Cinemachine Namespace

Cinemachine

Cinemachine Namespace

This namespace holds the Core Cinemachine code.
Classes
  ClassDescription
Public classCinemachineBasicMultiChannelPerlin
As a part of the Cinemachine Pipeline implementing the Noise stage, this component adds Perlin Noise to the Camera state, in the Correction channel of the CameraState. The noise is created by using a predefined noise profile asset. This defines the shape of the noise over time. You can scale this in amplitude or in time, to produce a large family of different noises using the same profile.
Public classCinemachineBlend
Describes a blend between 2 Cinemachine Virtual Cameras, and holds the current state of the blend.
Public classCinemachineBlendDefinitionPropertyAttribute
Property applied to CinemachineBlendDefinition. Used for custom drawing in the inspector.
Public classCinemachineBlenderSettings
Asset that defines the rules for blending between Virtual Cameras.
Public classCinemachineBlendListCamera
This is a virtual camera "manager" that owns and manages a collection of child Virtual Cameras. When the camera goes live, these child vcams are enabled, one after another, holding each camera for a designated time. Blends between cameras are specified. The last camera is held indefinitely.
Public classCinemachineBrain
CinemachineBrain is the link between the Unity Camera and the Cinemachine Virtual Cameras in the scene. It monitors the priority stack to choose the current Virtual Camera, and blend with another if necessary. Finally and most importantly, it applies the Virtual Camera state to the attached Unity Camera. The CinemachineBrain is also the place where rules for blending between virtual cameras are defined. Camera blending is an interpolation over time of one virtual camera position and state to another. If you think of virtual cameras as cameramen, then blending is a little like one cameraman smoothly passing the camera to another cameraman. You can specify the time over which to blend, as well as the blend curve shape. Note that a camera cut is just a zero-time blend.
Public classCinemachineBrainBrainEvent
Event with a CinemachineBrain parameter
Public classCinemachineBrainVcamEvent
Event with a ICinemachineCamera parameter
Public classCinemachineClearShot
Cinemachine ClearShot is a "manager camera" that owns and manages a set of Virtual Camera gameObject children. When Live, the ClearShot will check the children, and choose the one with the best quality shot and make it Live. This can be a very powerful tool. If the child cameras have CinemachineCollider extensions, they will analyze the scene for target obstructions, optimal target distance, and other items, and report their assessment of shot quality back to the ClearShot parent, who will then choose the best one. You can use this to set up complex multi-camera coverage of a scene, and be assured that a clear shot of the target will always be available. If multiple child cameras have the same shot quality, the one with the highest priority will be chosen. You can also define custom blends between the ClearShot children.
Public classCinemachineCollider
An add-on module for Cinemachine Virtual Camera that post-processes the final position of the virtual camera. Based on the supplied settings, the Collider will attempt to preserve the line of sight with the LookAt target of the virtual camera by moving away from objects that will obstruct the view. Additionally, the Collider can be used to assess the shot quality and report this as a field in the camera State.
Public classCinemachineComponentBase
An abstract representation of a mutator acting on a Cinemachine Virtual Camera
Public classCinemachineComposer
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera at the vcam's LookAt target object, with configurable offsets, damping, and composition rules. The composer does not change the camera's position. It will only pan and tilt the camera where it is, in order to get the desired framing. To move the camera, you have to use the virtual camera's Body section.
Public classCinemachineConfiner
An add-on module for Cinemachine Virtual Camera that post-processes the final position of the virtual camera. It will confine the virtual camera's position to the volume specified in the Bounding Volume field.
Public classCinemachineCore
A singleton that manages complete lists of CinemachineBrain and, Cinemachine Virtual Cameras, and the priority queue. Provides services to keeping track of whether Cinemachine Virtual Cameras have been updated each frame.
Public classCinemachineDollyCart
This is a very simple behaviour that constrains its transform to a CinemachinePath. It can be used to animate any objects along a path, or as a Follow target for Cinemachine Virtual Cameras.
Public classCinemachineExtension
Base class for a Cinemachine Virtual Camera extension module. Hooks into the Cinemachine Pipeline.
Public classCinemachineExternalCamera
This component will expose a non-cinemachine camera to the cinemachine system, allowing it to participate in blends. Just add it as a component alongside an existing Unity Camera component.
Public classCinemachineFollowZoom
An add-on module for Cinemachine Virtual Camera that adjusts the FOV of the lens to keep the target object at a constant size on the screen, regardless of camera and target position.
Public classCinemachineFramingTransposer
This is a Cinemachine Component in the Body section of the component pipeline. Its job is to position the camera in a fixed screen-space relationship to the vcam's Follow target object, with offsets and damping. The camera will be first moved along the camera Z axis until the Follow target is at the desired distance from the camera's X-Y plane. The camera will then be moved in its XY plane until the Follow target is at the desired point on the camera's screen. The FramingTansposer will only change the camera's position in space. It will not re-orient or otherwise aim the camera. For this component to work properly, the vcam's LookAt target must be null. The Follow target will define what the camera is looking at. If the Follow target is a CinemachineTargetGroup, then additional controls will be available to dynamically adjust the camera’s view in order to frame the entire group. Although this component was designed for orthographic cameras, it works equally well with persective cameras and can be used in 3D environments.
Public classCinemachineFreeLook
A Cinemachine Camera geared towards a 3rd person camera experience. The camera orbits around its subject with three separate camera rigs defining rings around the target. Each rig has its own radius, height offset, composer, and lens settings. Depending on the camera's position along the spline connecting these three rigs, these settings are interpolated to give the final camera position and state.
Public classCinemachineGroupComposer
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera at a target object, with configurable offsets, damping, and composition rules. In addition, if the target is a CinemachineTargetGroup, the behaviour will adjust the FOV and the camera distance to ensure that the entire group of targets is framed properly.
Public classCinemachineHardLockToTarget
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to place the camera on the Follow Target.
Public classCinemachineHardLookAt
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera hard at the LookAt target.
Public classCinemachineMixingCamera
CinemachineMixingCamera is a "manager camera" that takes on the state of the weighted average of the states of its child virtual cameras. A fixed number of slots are made available for cameras, rather than a dynamic array. We do it this way in order to support weight animation from the Timeline. Timeline cannot animate array elements.
Public classCinemachineOrbitalTransposer
This is a CinemachineComponent in the the Body section of the component pipeline. Its job is to position the camera in a variable relationship to a the vcam's Follow target object, with offsets and damping. This component is typically used to implement a camera that follows its target. It can accept player input from an input device, which allows the player to dynamically control the relationship between the camera and the target, for example with a joystick. The OrbitalTransposer introduces the concept of __Heading__, which is the direction in which the target is moving, and the OrbitalTransposer will attempt to position the camera in relationship to the heading, which is by default directly behind the target. You can control the default relationship by adjusting the Heading Bias setting. If you attach an input controller to the OrbitalTransposer, then the player can also control the way the camera positions itself in relation to the target heading. This allows the camera to move to any spot on an orbit around the target.
Public classCinemachinePath
Defines a world-space path, consisting of an array of waypoints, each of which has position, tangent, and roll settings. Bezier interpolation is performed between the waypoints, to get a smooth and continuous path.
Public classCinemachinePathBase
Abstract base class for a world-space path, suitable for a camera dolly track.
Public classCinemachinePathBaseAppearance
This class holds the settings that control how the path will appear in the editor scene view. The path is not visible in the game view
Public classCinemachinePipeline
Internal container for CinemachineComponentBase. Does nothing but contain.
Public classCinemachinePOV
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera in response to the user's mouse or joystick input. The composer does not change the camera's position. It will only pan and tilt the camera where it is, in order to get the desired framing. To move the camera, you have to use the virtual camera's Body section.
Public classCinemachineSmoothPath
Defines a world-space path, consisting of an array of waypoints, each of which has position and roll settings. Bezier interpolation is performed between the waypoints, to get a smooth and continuous path. The path will pass through all waypoints, and (unlike CinemachinePath) first and second order continuity is guaranteed
Public classCinemachineStateDrivenCamera
This is a virtual camera "manager" that owns and manages a collection of child Virtual Cameras. These child vcams are mapped to individual states in an animation state machine, allowing you to associate specific vcams to specific animation states. When that state is active in the state machine, then the associated camera will be activated. You can define custom blends and transitions between child cameras. In order to use this behaviour, you must have an animated target (i.e. an object animated with a state machine) to drive the behaviour.
Public classCinemachineTargetGroup
Defines a group of target objects, each with a radius and a weight. The weight is used when calculating the average position of the target group. Higher-weighted members of the group will count more. The bounding box is calculated by taking the member positions, weight, and radii into account.
Public classCinemachineTrackedDolly
A Cinemachine Virtual Camera Body component that constrains camera motion to a CinemachinePath. The camera can move along the path. This behaviour can operate in two modes: manual positioning, and Auto-Dolly positioning. In Manual mode, the camera's position is specified by animating the Path Position field. In Auto-Dolly mode, the Path Position field is animated automatically every frame by finding the position on the path that's closest to the virtual camera's Follow target.
Public classCinemachineTransposer
This is a CinemachineComponent in the Body section of the component pipeline. Its job is to position the camera in a fixed relationship to the vcam's Follow target object, with offsets and damping. The Tansposer will only change the camera's position in space. It will not re-orient or otherwise aim the camera. To to that, you need to instruct the vcam in the Aim section of its pipeline.
Public classCinemachineVirtualCamera
This behaviour is intended to be attached to an empty Transform GameObject, and it represents a Virtual Camera within the Unity scene. The Virtual Camera will animate its Transform according to the rules contained in its CinemachineComponent pipeline (Aim, Body, and Noise). When the virtual camera is Live, the Unity camera will assume the position and orientation of the virtual camera. A virtual camera is not a camera. Instead, it can be thought of as a camera controller, not unlike a cameraman. It can drive the Unity Camera and control its position, orientation, lens settings, and PostProcessing effects. Each Virtual Camera owns its own Cinemachine Component Pipeline, through which you provide the instructions for dynamically tracking specific game objects. A virtual camera is very lightweight, and does no rendering of its own. It merely tracks interesting GameObjects, and positions itself accordingly. A typical game can have dozens of virtual cameras, each set up to follow a particular character or capture a particular event. A Virtual Camera can be in any of three states: * **Live**: The virtual camera is actively controlling the Unity Camera. The virtual camera is tracking its targets and being updated every frame. * **Standby**: The virtual camera is tracking its targets and being updated every frame, but no Unity Camera is actively being controlled by it. This is the state of a virtual camera that is enabled in the scene but perhaps at a lower priority than the Live virtual camera. * **Disabled**: The virtual camera is present but disabled in the scene. It is not actively tracking its targets and so consumes no processing power. However, the virtual camera can be made live from the Timeline. The Unity Camera can be driven by any virtual camera in the scene. The game logic can choose the virtual camera to make live by manipulating the virtual cameras' enabled flags and their priorities, based on game logic. In order to be driven by a virtual camera, the Unity Camera must have a CinemachineBrain behaviour, which will select the most eligible virtual camera based on its priority or on other criteria, and will manage blending.
Public classCinemachineVirtualCameraBase
Base class for a Monobehaviour that represents a Virtual Camera within the Unity scene. This is intended to be attached to an empty Transform GameObject. Inherited classes can be either standalone virtual cameras such as CinemachineVirtualCamera, or meta-cameras such as CinemachineClearShot or CinemachineFreeLook. A CinemachineVirtualCameraBase exposes a Priority property. When the behaviour is enabled in the game, the Virtual Camera is automatically placed in a queue maintained by the static CinemachineCore singleton. The queue is sorted by priority. When a Unity camera is equipped with a CinemachineBrain behaviour, the brain will choose the camera at the head of the queue. If you have multiple Unity cameras with CinemachineBrain behaviours (say in a split-screen context), then you can filter the queue by setting the culling flags on the virtual cameras. The culling mask of the Unity Camera will then act as a filter for the brain. Apart from this, there is nothing that prevents a virtual camera from controlling multiple Unity cameras simultaneously.
Public classDocumentationSortingAttribute
Atrtribute to control the automatic generation of documentation.
Public classLensSettingsPropertyAttribute
Property applied to LensSettings. Used for custom drawing in the inspector.
Public classNoiseSettings
This is an asset that defines a noise profile. A noise profile is the shape of the noise as a function of time. You can build arbitrarily complex shapes by combining different base perlin noise frequencies at different amplitudes. The frequencies and amplitudes should be chosen with care, to ensure an interesting noise quality that is not obviously repetitive. As a mathematical side-note, any arbitrary periodic curve can be broken down into a series of fixed-amplitude sine-waves added together. This is called fourier decomposition, and is the basis of much signal processing. It doesn't really have much to do with this asset, but it's super interesting!
Public classNoSaveDuringPlayAttribute
Suppresses play-mode-save for a field. Use it if the calsee has [SaveDuringPlay] attribute but there are fields in the class that shouldn't be saved.
Public classSaveDuringPlayAttribute
Invoke play-mode-save for a class. This class's fields will be scanned upon exiting play mode, and its property values will be applied to the scene object. This is a stopgap measure that will become obsolete once Unity implements play-mode-save in a more general way.
Structures
  StructureDescription
Public structureAxisState
Axis state for defining to react to player input. The settings here control the responsiveness of the axis to player input.
Public structureCameraState
The output of the Cinemachine engine for a specific virtual camera. The information in this struct can be blended, and provides what is needed to calculate an appropriate camera position, orientation, and lens setting. Raw values are what the Cinemachine behaviours generate. The correction channel holds perturbations to the raw values - e.g. noise or smoothing, or obstacle avoidance corrections. Coirrections are not considered when making time-based calculations such as damping. The Final position and orientation is the comination of the raw values and their corrections.
Public structureCameraStateCustomBlendable
Opaque structure represent extra blendable stuff and its weight. The base system ignores this data - it is intended for extension modules
Public structureCinemachineBlendDefinition
Definition of a Camera blend. This struct holds the information necessary to generate a suitable AnimationCurve for a Cinemachine Blend.
Public structureCinemachineBlenderSettingsCustomBlend
Container specifying how two specific Cinemachine Virtual Cameras blend together.
Public structureCinemachineBlendListCameraInstruction
This represents a single entry in the instrunction list of the BlendListCamera.
Public structureCinemachineFreeLookOrbit
Defines the height and radius of the Rig orbit
Public structureCinemachineOrbitalTransposerHeading
How the "forward" direction is defined. Orbital offset is in relation to the forward direction.
Public structureCinemachineOrbitalTransposerRecentering
Controls how automatic orbit recentering occurs
Public structureCinemachinePathWaypoint
A waypoint along the path
Public structureCinemachineSmoothPathWaypoint
A waypoint along the path
Public structureCinemachineStateDrivenCameraInstruction
This represents a single instrunction to the StateDrivenCamera. It associates an state from the state machine with a child Virtual Camera, and also holds activation tuning parameters.
Public structureCinemachineTargetGroupTarget
Holds the information that represents a member of the group
Public structureCinemachineTrackedDollyAutoDolly
Controls how automatic dollying occurs
Public structureLensSettings
Describes the FOV and clip planes for a camera. This generally mirrors the Unity Camera's lens settings, and will be used to drive the Unity camera when the vcam is active.
Public structureNoiseSettingsNoiseParams
Describes the behaviour for a channel of noise
Public structureNoiseSettingsTransformNoiseParams
Contains the behaviour of noise for the noise module for all 3 cardinal axes of the camera
Interfaces
  InterfaceDescription
Public interfaceICinemachineCamera
An abstract representation of a virtual camera which lives within the Unity scene
Delegates
  DelegateDescription
Public delegateCinemachineCoreAxisInputDelegate
Delegate for overriding Unity's default input system. Returns the value of the named axis.
Public delegateCinemachineFreeLookCreateRigDelegate
Override component pipeline creation. This needs to be done by the editor to support Undo. The override must do exactly the same thing as the CreatePipeline method in this class.
Public delegateCinemachineFreeLookDestroyRigDelegate
Override component pipeline destruction. This needs to be done by the editor to support Undo.
Public delegateCinemachineVirtualCameraCreatePipelineDelegate
Override component pipeline creation. This needs to be done by the editor to support Undo. The override must do exactly the same thing as the CreatePipeline method in the CinemachineVirtualCamera class.
Public delegateCinemachineVirtualCameraDestroyPipelineDelegate
Override component pipeline destruction. This needs to be done by the editor to support Undo.
Public delegateCinemachineVirtualCameraBaseOnPostPipelineStageDelegate
A delegate to hook into the state calculation pipeline. This will be called after each pipeline stage, to allow other services to hook into the pipeline. See CinemachineCore.Stage. Parameters: * CinemachineVirtualCameraBase vcam: the virtual camera being updated * CinemachineCore.Stage stage: what stage in the pipeline has just been updated * ref CameraState newState: the current state of the vcam * float deltaTime: the frame timestep. Less than 0 means "don't consider the previous frame"
Enumerations
  EnumerationDescription
Public enumerationCinemachineBlendDefinitionStyle
Supported predefined shapes for the blend curve.
Public enumerationCinemachineBrainUpdateMethod
This enum defines the options available for the update method.
Public enumerationCinemachineColliderResolutionStrategy
The way in which the Collider will attempt to preserve sight of the target.
Public enumerationCinemachineConfinerMode
The confiner can operate using a 2D bounding shape or a 3D bounding volume
Public enumerationCinemachineCoreStage
Stages in the Cinemachine Component pipeline, used for UI organization>. This enum defines the pipeline order.
Public enumerationCinemachineCoreUpdateFilter
Internal use only
Public enumerationCinemachineDollyCartUpdateMethod
This enum defines the options available for the update method.
Public enumerationCinemachineFramingTransposerAdjustmentMode
How to adjust the camera to get the desired framing
Public enumerationCinemachineFramingTransposerFramingMode
What screen dimensions to consider when framing
Public enumerationCinemachineGroupComposerAdjustmentMode
How to adjust the camera to get the desired framing
Public enumerationCinemachineGroupComposerFramingMode
What screen dimensions to consider when framing
Public enumerationCinemachineOrbitalTransposerHeadingHeadingDefinition
Sets the algorithm for determining the target's heading for purposes of re-centering the camera
Public enumerationCinemachinePathBasePositionUnits
How to interpret the Path Position
Public enumerationCinemachineTargetGroupPositionMode
How the group's position is calculated
Public enumerationCinemachineTargetGroupRotationMode
How the group's orientation is calculated
Public enumerationCinemachineTargetGroupUpdateMethod
This enum defines the options available for the update method.
Public enumerationCinemachineTrackedDollyCameraUpMode
Different ways to set the camera's up vector
Public enumerationCinemachineTransposerBindingMode
The coordinate space to use when interpreting the offset from the target
Public enumerationDocumentationSortingAttributeLevel
Refinement level of the documentation