docs.unity.cn
    Show / Hide Table of Contents

    Class CinemachineFreeLookModifier.Modifier

    Interface for an object that will modify some aspect of a FreeLook camera based on the vertical axis value.

    Inheritance
    Object
    CinemachineFreeLookModifier.Modifier
    CinemachineFreeLookModifier.ComponentModifier<T>
    CinemachineFreeLookModifier.LensModifier
    CinemachineFreeLookModifier.TiltModifier
    Namespace: Unity.Cinemachine
    Syntax
    [Serializable]
    public abstract class Modifier

    Properties

    CachedComponentType

    Type of the cached component (null if no cached component). If this modifier targets specific components, this value indicates the type of that component. The modifier should cache the component, for performance.

    Declaration
    public virtual Type CachedComponentType { get; }
    Property Value
    Type Description
    Type

    HasRequiredComponent

    Return true if cached vcam component is present or not required

    Declaration
    public virtual bool HasRequiredComponent { get; }
    Property Value
    Type Description
    Boolean

    Methods

    AfterPipeline(CinemachineVirtualCameraBase, ref CameraState, Single, Single)

    Called from extension's PostPipelineStageCallback(Finalize). Perform any necessary actions to state, and restore any camera parameters changed in BeforePipeline(CinemachineVirtualCameraBase, ref CameraState, Single, Single).

    Declaration
    public virtual void AfterPipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    vcam owner

    CameraState state

    current vcam state. May be modified in this function

    Single deltaTime

    current applicable deltaTime

    Single modifierValue

    The normalized value of the modifier variable.
    This is the FreeLook's vertical axis. Ranges from -1 to 1, where 0 is center rig.

    BeforePipeline(CinemachineVirtualCameraBase, ref CameraState, Single, Single)

    Called from extension's PrePipelineMutateCameraState(). Perform any necessary actions to modify relevant camera settings. Original camera settings should be restored in AfterPipeline(CinemachineVirtualCameraBase, ref CameraState, Single, Single).

    Declaration
    public virtual void BeforePipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    vcam owner

    CameraState state

    current vcam state. May be modified in this function

    Single deltaTime

    current applicable deltaTime

    Single modifierValue

    The normalized value of the modifier variable.
    This is the FreeLook's vertical axis. Ranges from -1 to 1, where 0 is center rig.

    RefreshCache(CinemachineVirtualCameraBase)

    Called from OnEnable and from the inspector. Refresh any performance-sensitive stuff.

    Declaration
    public virtual void RefreshCache(CinemachineVirtualCameraBase vcam)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    the virtual camera owner

    Reset(CinemachineVirtualCameraBase)

    Called when the modifier is created. Initialize fields with appropriate values.

    Declaration
    public virtual void Reset(CinemachineVirtualCameraBase vcam)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    the virtual camera owner

    Validate(CinemachineVirtualCameraBase)

    Called from OnValidate in the editor. Validate and sanitize the fields.

    Declaration
    public virtual void Validate(CinemachineVirtualCameraBase vcam)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    the virtual camera owner

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Saturday, May 6, 2023