{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class CinemachineVirtualCameraBase | Cinemachine | 2.6.0
docs.unity3d.com
"{0}" の検索結果

    目次を表示する/隠す

    Class CinemachineVirtualCameraBase

    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.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    CinemachineVirtualCameraBase
    CinemachineBlendListCamera
    CinemachineClearShot
    CinemachineExternalCamera
    CinemachineFreeLook
    CinemachineMixingCamera
    CinemachineStateDrivenCamera
    CinemachineVirtualCamera
    Implements
    ICinemachineCamera
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Cinemachine
    Assembly: solution.dll
    Syntax
    public abstract class CinemachineVirtualCameraBase : MonoBehaviour, ICinemachineCamera

    Fields

    Name Description
    m_ExcludedPropertiesInInspector

    Inspector control - Use for hiding sections of the Inspector UI.

    m_LockStageInInspector

    Inspector control - Use for enabling sections of the Inspector UI.

    m_Priority

    The priority will determine which camera becomes active based on the state of other cameras and this camera. Higher numbers have greater priority.

    m_StandbyUpdate

    When the virtual camera is not live, this is how often the virtual camera will be updated. Set this to tune for performance. Most of the time Never is fine, unless the virtual camera is doing shot evaluation.

    Properties

    Name Description
    Description

    Gets a brief debug description of this virtual camera, for use when displayiong debug info

    Follow

    Get the Follow target for the Body component in the Cinemachine pipeline.

    FollowTargetAttachment

    This must be set every frame at the start of the pipeline to relax the virtual camera's attachment to the target. Range is 0...1.
    1 is full attachment, and is the normal state. 0 is no attachment, and virtual camera will behave as if no Follow targets are set.

    IsValid

    Will return false if this references a deleted object

    LookAt

    Get the LookAt target for the Aim component in the Cinemachine pipeline.

    LookAtTargetAttachment

    This must be set every frame at the start of the pipeline to relax the virtual camera's attachment to the target. Range is 0...1.
    1 is full attachment, and is the normal state. 0 is no attachment, and virtual camera will behave as if no LookAt targets are set.

    Name

    Get the name of the Virtual Camera. Base implementation returns the owner GameObject's name.

    ParentCamera

    Support for meta-virtual-cameras. This is the situation where a virtual camera is in fact the public face of a private army of virtual cameras, which it manages on its own. This method gets the VirtualCamera owner, if any. Private armies are implemented as Transform children of the parent vcam.

    PreviousStateIsValid

    Set this to force the next update to ignore deltaTime and reset itself

    Priority

    Get the Priority of the virtual camera. This determines its placement in the CinemachineCore's queue of eligible shots.

    State

    The CameraState object holds all of the information necessary to position the Unity camera. It is the output of this class.

    ValidatingStreamVersion

    Version that was last streamed, for upgrading legacy

    VirtualCameraGameObject

    The GameObject owner of the Virtual Camera behaviour.

    Methods

    Name Description
    AddExtension(CinemachineExtension)

    A delegate to hook into the state calculation pipeline. This will be called after each pipeline stage, to allow others to hook into the pipeline. See CinemachineCore.Stage.

    ApplyPositionBlendMethod(ref CameraState, BlendHint)

    Applies a position blend hint to the camera state

    CreateBlend(ICinemachineCamera, ICinemachineCamera, CinemachineBlendDefinition, CinemachineBlend)

    Create a blend between 2 virtual cameras, taking into account any existing active blend.

    DetachedFollowTargetDamp(float, float, float)

    Get a damped version of a quantity. This is the portion of the quantity that will take effect over the given time. This method takes the target attachment into account. For general damping without consideration of target attachment, use Damper.Damp()

    DetachedFollowTargetDamp(Vector3, float, float)

    Get a damped version of a quantity. This is the portion of the quantity that will take effect over the given time. This method takes the target attachment into account. For general damping without consideration of target attachment, use Damper.Damp()

    DetachedFollowTargetDamp(Vector3, Vector3, float)

    Get a damped version of a quantity. This is the portion of the quantity that will take effect over the given time. This method takes the target attachment into account. For general damping without consideration of target attachment, use Damper.Damp()

    DetachedLookAtTargetDamp(float, float, float)

    Get a damped version of a quantity. This is the portion of the quantity that will take effect over the given time. This method takes the target attachment into account. For general damping without consideration of target attachment, use Damper.Damp()

    DetachedLookAtTargetDamp(Vector3, float, float)

    Get a damped version of a quantity. This is the portion of the quantity that will take effect over the given time. This method takes the target attachment into account. For general damping without consideration of target attachment, use Damper.Damp()

    DetachedLookAtTargetDamp(Vector3, Vector3, float)

    Get a damped version of a quantity. This is the portion of the quantity that will take effect over the given time. This method takes the target attachment into account. For general damping without consideration of target attachment, use Damper.Damp()

    ForceCameraPosition(Vector3, Quaternion)

    Force the virtual camera to assume a given position and orientation

    GetInputAxisProvider()

    Locate the first component that implements AxisState.IInputAxisProvider.

    GetMaxDampTime()

    Query components and extensions for the maximum damping time. Base class implementation queries extensions. Only used in editor for timeline scrubbing.

    InternalUpdateCameraState(Vector3, float)

    Internal use only. Do not call this method. Called by CinemachineCore at designated update time so the vcam can position itself and track its targets. Do not call this method. Let the framework do it at the appropriate time

    InvokeOnTransitionInExtensions(ICinemachineCamera, Vector3, float)

    Invokes the OnTransitionFromCamera for all extensions on this camera

    InvokePostPipelineStageCallback(CinemachineVirtualCameraBase, Stage, ref CameraState, float)

    Invokes the PostPipelineStageDelegate for this camera, and up the hierarchy for all parent cameras (if any). Implementaion must be sure to call this after each pipeline stage, to allow other services to hook into the pipeline. See CinemachineCore.Stage.

    InvokePrePipelineMutateCameraStateCallback(CinemachineVirtualCameraBase, ref CameraState, float)

    Invokes the PrePipelineMutateCameraStateCallback for this camera, and up the hierarchy for all parent cameras (if any). Implementaion must be sure to call this after each pipeline stage, to allow other services to hook into the pipeline. See CinemachineCore.Stage.

    IsLiveChild(ICinemachineCamera, bool)

    Check whether the vcam a live child of this camera. This base class implementation always returns false.

    MoveToTopOfPrioritySubqueue()

    When multiple virtual cameras have the highest priority, there is sometimes the need to push one to the top, making it the current Live camera if it shares the highest priority in the queue with its peers.

     This happens automatically when a
     new vcam is enabled: the most recent one goes to the top of the priority subqueue.
     Use this method to push a vcam to the top of its priority peers.
     If it and its peers share the highest priority, then this vcam will become Live.
    
    OnDestroy()

    Maintains the global vcam registry. Always call the base class implementation.

    OnDisable()

    Base class implementation makes sure the priority queue remains up-to-date.

    OnEnable()

    Base class implementation adds the virtual camera from the priority queue.

    OnTargetObjectWarped(Transform, Vector3)

    This is called to notify the component that a target got warped, so that the component can update its internal state to make the camera also warp seamlessy.

    OnTransformParentChanged()

    Base class implementation makes sure the priority queue remains up-to-date.

    OnTransitionFromCamera(ICinemachineCamera, Vector3, float)

    Notification that this virtual camera is going live. Base class implementation must be called by any overridden method.

    OnValidate()

    Enforce bounds for fields, when changed in inspector. Call base class implementation at the beginning of overridden method. After base method is called, ValidatingStreamVersion will be valid.

    PullStateFromVirtualCamera(Vector3, ref LensSettings)

    Create a camera state based on the current transform of this vcam

    RemoveExtension(CinemachineExtension)

    Remove a Pipeline stage hook callback.

    ResolveFollow(Transform)

    Returns this vcam's Follow target, or if that is null, will retrun the parent vcam's Follow target.

    ResolveLookAt(Transform)

    Returns this vcam's LookAt target, or if that is null, will retrun the parent vcam's LookAt target.

    Start()

    Derived classes should call base class implementation.

    Update()

    Base class implementation makes sure the priority queue remains up-to-date.

    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.

    概要
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)