docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CinemachineCore

    A singleton that manages complete lists of CinemachineBrain and, CinemachineCamera, and the priority queue. Provides services to keeping track of whether CinemachineCameras have been updated each frame.

    Inheritance
    object
    CinemachineCore
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Cinemachine
    Assembly: solution.dll
    Syntax
    public static class CinemachineCore

    Fields

    Name Description
    BlendCreatedEvent

    This event will fire when a blend is created.
    Handler can modify the settings of the blend (but not the cameras).

    Note: BlendCreatedEvents are NOT sent for timeline blends, as those are expected 
    to be controlled 100% by timeline. To modify the blend algorithm for timeline blends, 
    you can install a handler for CinemachineCore.GetCustomBlender.
    
    BlendFinishedEvent

    This event will fire when the current camera completes a blend-in.

    CameraActivatedEvent

    This event will fire when the current camera changes, at the start of a blend

    CameraDeactivatedEvent

    This event will fire immediately after a camera that is live in some context stops being live.

    CameraUpdatedEvent

    This event will fire after a brain updates its Camera

    CurrentTimeOverride

    If non-negative, cinemachine will use this value whenever it wants current game time. Usage is for master timelines in manual update mode, for deterministic behaviour.

    GetBlendOverride

    Delegate for overriding a blend that is about to be applied to a transition. A handler can either return the default blend, or a new blend specific to current conditions.

    GetCustomBlender

    Delegate for replacing a standard CinemachineBlend with a custom blender class. Returns a new instance of a custom blender, or null to use the default blender.

    GetInputAxis

    Delegate for overriding Unity's default input system. If you set this, then your delegate will be called instead of System.Input.GetAxis(axisName) whenever in-game user input is needed.

    UniformDeltaTimeOverride

    If non-negative, cinemachine will update with this uniform delta time. Usage is for timelines in manual update mode.

    kPackageRoot

    The root directory where Cinemachine is installed

    Properties

    Name Description
    CurrentTime

    Replacement for Time.time, taking CurrentTimeTimeOverride into account.

    DeltaTime

    Replacement for Time.deltaTime, taking UniformDeltaTimeOverride into account.

    SoloCamera

    API for the Unity Editor. Show this camera no matter what. This is static, and so affects all Cinemachine brains.

    VirtualCameraCount

    List of all active CinemachineCameras for all brains. This list is kept sorted by priority.

    Methods

    Name Description
    FindPotentialTargetBrain(CinemachineVirtualCameraBase)

    Try to find a CinemachineBrain to associate with a CinemachineCamera. The first CinemachineBrain in which this CinemachineCamera is live will be used. If none, then the first active CinemachineBrain with the correct layer filter will be used. Brains with OutputCamera == null will not be returned. Final result may be null.

    GetVirtualCamera(int)

    Access the priority-sorted array of active ICinemachineCamera in the scene.

    IsLive(ICinemachineCamera)

    Is this virtual camera currently actively controlling any Camera?

    IsLiveInBlend(ICinemachineCamera)

    Checks if the vcam is live as part of an outgoing blend in any active CinemachineBrain.
    Does not check whether the vcam is also the current active vcam.

    OnTargetObjectWarped(Transform, Vector3)

    Call this to notify all virtual cameras that may be tracking a target that the target's position has suddenly warped to somewhere else, so that the virtual cameras can update their internal state to make the camera warp seamlessly along with the target.

    All virtual cameras are iterated so this call will work no matter how many 
    are tracking the target, and whether they are active or inactive.
    
    ResetCameraState()

    Call this to notify all virtual cameras to forget state from the previous frame. This is essentially a reset of all the Cinemachine cameras. It is useful, for example, when you want to restart a game level.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)