docs.unity3d.com
    Show / Hide Table of Contents

    Interface ICameraOverrideStack

    This interface is specifically for Timeline. Do not use it.

    Namespace: Cinemachine
    Syntax
    public interface ICameraOverrideStack

    Properties

    DefaultWorldUp

    Get the current definition of Up. May be different from Vector3.up.

    Declaration
    Vector3 DefaultWorldUp { get; }
    Property Value
    Type Description
    Vector3

    Methods

    ReleaseCameraOverride(Int32)

    See SetCameraOverride. Call ReleaseCameraOverride after all overriding is finished, to free the OverrideStack resources.

    Declaration
    void ReleaseCameraOverride(int overrideId)
    Parameters
    Type Name Description
    Int32 overrideId

    The ID to released. This is the value that was returned by SetCameraOverride

    SetCameraOverride(Int32, ICinemachineCamera, ICinemachineCamera, Single, Single)

    Override the current camera and current blend. This setting will trump any in-game logic that sets virtual camera priorities and Enabled states. This is the main API for the timeline.

    Declaration
    int SetCameraOverride(int overrideId, ICinemachineCamera camA, ICinemachineCamera camB, float weightB, float deltaTime)
    Parameters
    Type Name Description
    Int32 overrideId

    Id to represent a specific client. An internal stack is maintained, with the most recent non-empty override taking precenence. This id must be > 0. If you pass -1, a new id will be created, and returned. Use that id for subsequent calls. Don't forget to call ReleaseCameraOverride after all overriding is finished, to free the OverideStack resources.

    ICinemachineCamera camA

    The camera to set, corresponding to weight=0.

    ICinemachineCamera camB

    The camera to set, corresponding to weight=1.

    Single weightB

    The blend weight. 0=camA, 1=camB.

    Single deltaTime

    Override for deltaTime. Should be Time.FixedDelta for time-based calculations to be included, -1 otherwise.

    Returns
    Type Description
    Int32

    The override ID. Don't forget to call ReleaseCameraOverride after all overriding is finished, to free the OverideStack resources.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023