### Unity Cinemachine Start Method Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineVirtualCameraBase.html The Start method is called when the script instance is being loaded. Derived classes should ensure they call the base class implementation to perform necessary initialization. ```csharp protected virtual void Start() { // Derived classes should call base class implementation. } ``` -------------------------------- ### GET /Unity.Cinemachine/ScreenComposerSettings/DeadZoneSettings Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.ScreenComposerSettings.DeadZoneSettings.html Retrieves or defines the configuration for the DeadZone area in the ScreenComposerSettings. ```APIDOC ## GET /Unity.Cinemachine/ScreenComposerSettings/DeadZoneSettings ### Description Defines the settings for the DeadZone, an area within which the camera will not adjust itself to follow a target. ### Method GET ### Endpoint Unity.Cinemachine.ScreenComposerSettings.DeadZoneSettings ### Parameters #### Request Body - **Enabled** (bool) - Required - Enables or disables the Dead Zone settings. - **Size** (Vector2) - Required - Defines the range of the screen position where the camera will not adjust. Full screen size is 1. ### Request Example { "Enabled": true, "Size": { "x": 0.5, "y": 0.5 } } ### Response #### Success Response (200) - **Enabled** (bool) - Current status of the Dead Zone. - **Size** (Vector2) - Current size configuration of the Dead Zone. #### Response Example { "Enabled": true, "Size": { "x": 0.5, "y": 0.5 } } ``` -------------------------------- ### CinemachineMixerEventsBase Event Handlers Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBrainEvents.html Methods for managing and installing event handlers for camera transitions and blends. ```APIDOC ## POST /CinemachineMixerEventsBase/InstallHandlers ### Description Installs the necessary event handlers for a given ICinemachineMixer instance to track camera activation and blend states. ### Method POST ### Endpoint /CinemachineMixerEventsBase/InstallHandlers ### Parameters #### Request Body - **mixer** (ICinemachineMixer) - Required - The mixer instance to attach event handlers to. ### Request Example { "mixer": "ICinemachineMixerInstance" } ### Response #### Success Response (200) - **status** (string) - Returns "Success" upon successful installation of handlers. ## POST /CinemachineMixerEventsBase/UninstallHandlers ### Description Removes all currently active event handlers from the mixer, preventing further event callbacks. ### Method POST ### Endpoint /CinemachineMixerEventsBase/UninstallHandlers ### Response #### Success Response (200) - **status** (string) - Returns "Success" upon successful uninstallation. ``` -------------------------------- ### Configure Framing Parameters Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFramingTransposer.html Examples of field declarations for the CinemachineFramingTransposer component, including adjustment modes and dead zone settings. ```csharp public CinemachineFramingTransposer.AdjustmentMode m_AdjustmentMode; [Range(-0.5f, 0.5f)] public float m_BiasX; [Range(0f, 2f)] public float m_DeadZoneHeight; public bool m_CenterOnActivate; ``` -------------------------------- ### System Object Get Type Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineStateDrivenCamera.html Gets the runtime type of the current object. ```csharp object.GetType(); ``` -------------------------------- ### Initialize AxisState.Recentering Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.AxisState.Recentering.html Demonstrates how to instantiate the Recentering struct with specific configuration parameters for enabling and timing. ```csharp using Unity.Cinemachine; // Initialize recentering: enabled, 2.0s wait, 1.5s duration AxisState.Recentering recentering = new AxisState.Recentering(true, 2.0f, 1.5f); ``` -------------------------------- ### Unity C# - Component Get Component Index Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineStateDrivenCamera.html Gets the index of the component within the list of components on the same GameObject. ```csharp Component.GetComponentIndex(); ``` -------------------------------- ### Initialize CinemachineOrbitalTransposer.Heading Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineOrbitalTransposer.Heading.html Demonstrates how to instantiate the Heading struct using its constructor, which requires a definition type, filter strength, and bias value. ```csharp using Unity.Cinemachine; // Example of initializing the Heading struct var heading = new CinemachineOrbitalTransposer.Heading( CinemachineOrbitalTransposer.Heading.HeadingDefinition.PositionDelta, 5, 0.0f ); ``` -------------------------------- ### Implement PlayableAsset and IPropertyPreview Methods Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineShot.html Methods required to create playables for the graph and gather property data for the Timeline preview system. ```csharp public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { // Implementation logic for creating the playable } public void GatherProperties(PlayableDirector director, IPropertyCollector driver) { // Implementation logic for gathering properties } ``` -------------------------------- ### GET /cinemachine/camera/properties Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/manual/CinemachineSequencerCamera.html Retrieves the configuration properties for a CinemachineCamera instance. ```APIDOC ## GET /cinemachine/camera/properties ### Description Returns the current state and configuration properties of the CinemachineCamera, including priority, standby update modes, and target tracking settings. ### Method GET ### Endpoint /cinemachine/camera/properties ### Parameters #### Query Parameters - **camera_id** (string) - Required - The unique identifier of the CinemachineCamera instance. ### Response #### Success Response (200) - **solo** (boolean) - Whether the camera is temporarily live. - **priority** (integer) - The priority value for camera selection. - **standby_update** (string) - The update frequency mode (Never, Always, Round Robin). - **show_debug_text** (boolean) - Whether debug info is visible in the Game View. #### Response Example { "solo": false, "priority": 10, "standby_update": "Always", "show_debug_text": true } ``` -------------------------------- ### Implement IInputAxisOwner Interface Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.IInputAxisOwner.html This snippet demonstrates the definition of the IInputAxisOwner interface and the required GetInputAxes method signature for reporting input axes. ```csharp public interface IInputAxisOwner { void GetInputAxes(List axes); } ``` -------------------------------- ### GET SignalDuration Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.NoiseSettings.html Retrieves the total length of the signal in seconds. ```APIDOC ## GET SignalDuration ### Description Returns the total length in seconds of the signal. Returns 0 for signals of indeterminate length. ### Method GET ### Endpoint SignalDuration ### Response #### Success Response (200) - **duration** (float) - The length of the signal in seconds. ``` -------------------------------- ### Initialize NestedBlendSource Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.NestedBlendSource.html Demonstrates how to instantiate a NestedBlendSource by wrapping an existing CinemachineBlend object. ```csharp using Unity.Cinemachine; // Assuming 'myBlend' is an existing CinemachineBlend object NestedBlendSource blendSource = new NestedBlendSource(myBlend); ``` -------------------------------- ### Delegate IInputAxisOwner.AxisDescriptor.AxisGetter Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.IInputAxisOwner.AxisDescriptor.AxisGetter.html Delegate to get a reference to the axis being driven. ```APIDOC ## Delegate IInputAxisOwner.AxisDescriptor.AxisGetter ### Description Delegate to get a reference to the axis being driven. ### Namespace Unity.Cinemachine ### Assembly Unity.Cinemachine.dll ### Syntax ```csharp public delegate ref InputAxis IInputAxisOwner.AxisDescriptor.AxisGetter() ``` ### Returns - **InputAxis** - A reference to the axis being driven. ``` -------------------------------- ### CinemachineBrain ActiveVirtualCamera Property Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBrain.html Gets the current active CinemachineCamera. ```csharp public ICinemachineCamera ActiveVirtualCamera { get; }ﺣ ``` -------------------------------- ### Initialize CinemachineTrackedDolly.AutoDolly Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineTrackedDolly.AutoDolly.html Demonstrates how to instantiate the AutoDolly struct with specific parameters to configure automatic path following behavior. ```csharp using Unity.Cinemachine; // Initialize AutoDolly with enabled state, offset, search radius, and resolution CinemachineTrackedDolly.AutoDolly autoDolly = new CinemachineTrackedDolly.AutoDolly( enabled: true, positionOffset: 0.5f, searchRadius: 5, stepsPerSegment: 10 ); ``` -------------------------------- ### Implement Component Methods Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineHardLockToTarget.html Methods for retrieving damping time and mutating the camera state based on target tracking. ```csharp public override float GetMaxDampTime() {} public override void MutateCameraState(ref CameraState curState, float deltaTime) {} ``` -------------------------------- ### GET /properties Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachinePositionComposer.html Retrieves the state and configuration properties of the FramingTransposer component. ```APIDOC ## GET /properties ### Description Retrieves component-specific properties including execution order, validity status, and pipeline stage. ### Method GET ### Endpoint /properties ### Response #### Success Response (200) - **BodyAppliesAfterAim** (bool) - Indicates if the component applies after the Aim stage. - **IsValid** (bool) - True if the component is enabled and has a valid Follow target. - **Stage** (CinemachineCore.Stage) - The pipeline stage implemented by this component. ``` -------------------------------- ### ICinemachineCamera Interface Methods Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.ICinemachineCamera.html Documentation for the core methods used to manage camera activation and state updates. ```APIDOC ## POST /ICinemachineCamera/OnCameraActivated ### Description Notifies the camera that it is being activated. This is triggered when a camera becomes active, with the incoming camera context provided in the event parameters. ### Method POST ### Parameters #### Request Body - **evt** (ICinemachineCamera.ActivationEventParams) - Required - Context for the camera activation containing the incoming camera reference. ### Request Example { "evt": { "IncomingCamera": "this" } } ## POST /ICinemachineCamera/UpdateCameraState ### Description Updates the camera's state based on the world up vector and delta time. Implementations should ensure this is called only once per frame. ### Method POST ### Parameters #### Request Body - **worldUp** (Vector3) - Required - The default world Up vector set by the CinemachineBrain. - **deltaTime** (float) - Required - Delta time for time-based effects. ### Request Example { "worldUp": { "x": 0, "y": 1, "z": 0 }, "deltaTime": 0.016 } ``` -------------------------------- ### GET /api/cinemachine/rotation-composer Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineRotationComposer.html Retrieves the configuration and operational status of the CinemachineRotationComposer component. ```APIDOC ## GET /api/cinemachine/rotation-composer ### Description Retrieves the current settings for the CinemachineRotationComposer, including damping, offsets, and composition rules used to aim the camera at the LookAt target. ### Method GET ### Endpoint /api/cinemachine/rotation-composer ### Parameters #### Query Parameters - **vcam_id** (string) - Required - The unique identifier of the virtual camera containing the rotation composer. ### Request Example GET /api/cinemachine/rotation-composer?vcam_id=vcam_001 ### Response #### Success Response (200) - **damping** (float) - The smoothing factor for rotation movements. - **lookAtOffset** (vector3) - The offset applied to the LookAt target position. - **compositionRules** (object) - The defined framing rules for the composer. #### Response Example { "damping": 0.5, "lookAtOffset": {"x": 0, "y": 1, "z": 0}, "compositionRules": {"deadZone": 0.1} } ``` -------------------------------- ### InputAxis Method Implementations Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.InputAxis.html Illustrates the implementation signatures for various methods within the InputAxis struct, such as clamping, normalizing, and managing recentering behavior. ```csharp public void CancelRecentering(); public float ClampValue(float v) { // Clamp the value to range, taking wrap into account } public float GetClampedValue() { // Get the clamped axis value } public float GetNormalizedValue() { // Clamp and scale the value to range 0...1, taking wrap into account } public void Reset(); public bool TrackValueChange() { // Track any value changes so that the re-centering clock is updated properly // Returns true if value changed. } public void TriggerRecentering(); public void UpdateRecentering(float deltaTime, bool forceCancel) { // Manage re-centering axis value towards axis center. } public void UpdateRecentering(float deltaTime, bool forceCancel, float center) { // Manage re-centering axis value towards the supplied center value. } ``` -------------------------------- ### Accessing CinemachinePhysicalLensPalette Singleton Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.Editor.CinemachinePhysicalLensPalette.html Demonstrates how to retrieve the singleton instance of the lens palette. Use 'Instance' to ensure the asset exists, or 'InstanceIfExists' to check for its presence without creating it. ```csharp using Unity.Cinemachine.Editor; // Get the singleton instance, creating it if it doesn't exist var palette = CinemachinePhysicalLensPalette.Instance; // Check if the instance exists without creating it var existingPalette = CinemachinePhysicalLensPalette.InstanceIfExists; if (existingPalette != null) { Debug.Log("Palette found."); } ``` -------------------------------- ### GET /api/cinemachine/virtual-camera-base Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineExternalCamera.html Retrieves the structure and inherited members of the CinemachineVirtualCameraBase class. ```APIDOC ## GET /api/cinemachine/virtual-camera-base ### Description Provides a reference to the properties and methods available on the CinemachineVirtualCameraBase class, which serves as the foundation for all virtual cameras in the Cinemachine package. ### Method GET ### Endpoint /api/cinemachine/virtual-camera-base ### Parameters #### Query Parameters - **includeInherited** (boolean) - Optional - Whether to include members inherited from MonoBehaviour, Behaviour, and Component. ### Request Example { "includeInherited": true } ### Response #### Success Response (200) - **members** (array) - A list of available properties and methods including Priority, FollowTargetAttachment, UpdateCameraState, and component lifecycle methods. #### Response Example { "class": "CinemachineVirtualCameraBase", "members": [ "Priority", "FollowTargetAttachment", "UpdateCameraState", "OnEnable", "OnDisable" ] } ``` -------------------------------- ### CinemachineBrain DefaultWorldUp Property Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBrain.html Gets the default world up vector for the CinemachineCameras. ```csharp public Vector3 DefaultWorldUp { get; }ﺣ ``` -------------------------------- ### Manage Camera Transitions in CinemachineComponentBase (C#) Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineOrbitalTransposer.html Handles the transition from another virtual camera to the current one. This method is called when the virtual camera becomes active. It returns a boolean indicating if an internal update is required. Parameters include the previous camera, world up vector, and delta time. ```csharp public override bool OnTransitionFromCamera(ICinemachineCamera fromCam, Vector3 worldUp, float deltaTime) ``` -------------------------------- ### Convert LegacyLensSettings to LensSettings Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.LegacyLensSettings.html Methods to facilitate the migration from legacy lens settings to the new LensSettings format. Includes a method to populate settings from an existing source and a method to export to the new format. ```csharp public void SetFromLensSettings(LensSettings src); public LensSettings ToLensSettings(); ``` -------------------------------- ### GET /CinemachineComponentBase/Properties Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineComponentBase.html Retrieves the state and target information from a Cinemachine component. ```APIDOC ## GET /CinemachineComponentBase/Properties ### Description Access properties related to the virtual camera's targets, state, and pipeline stage. ### Method GET ### Endpoint /CinemachineComponentBase/Properties ### Response #### Success Response (200) - **FollowTarget** (Transform) - The owner vcam's Follow target. - **LookAtTarget** (Transform) - The owner vcam's LookAt target. - **VcamState** (CameraState) - The owner vcam's CameraState. - **Stage** (CinemachineCore.Stage) - The pipeline stage of the component. - **IsValid** (bool) - Returns true if the object is enabled and set up. #### Response Example { "FollowTarget": "TransformObject", "LookAtTarget": "TransformObject", "IsValid": true, "Stage": "Aim" } ``` -------------------------------- ### Handle Camera Transition Notifications Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineClearShot.html Provides a hook to execute logic when the virtual camera transitions to a live state. ```csharp public override void OnTransitionFromCamera(ICinemachineCamera fromCam, Vector3 worldUp, float deltaTime) ``` -------------------------------- ### GetComponentOwner Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineVirtualCamera.html Gets the hidden CinemachinePipeline child object associated with the virtual camera. ```APIDOC ## GetComponentOwner() ### Description Gets the hidden CinemachinePipeline child object associated with the virtual camera. ### Method GET ### Endpoint N/A (Method within a class) ### Returns - **Transform** - The hidden CinemachinePipeline child object. ``` -------------------------------- ### GET /api/cinemachine/lens-settings/compare Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.LensSettings.html Compares two LensSettings objects to determine if they are approximately equal. ```APIDOC ## GET /api/cinemachine/lens-settings/compare ### Description Compares two instances of LensSettings to check for approximate equality, useful for validating camera state transitions. ### Method GET ### Endpoint /api/cinemachine/lens-settings/compare ### Parameters #### Query Parameters - **a** (LensSettings) - Required - The first lens settings object to compare. - **b** (LensSettings) - Required - The second lens settings object to compare. ### Request Example { "a": { "FieldOfView": 60.0, "NearClipPlane": 0.3 }, "b": { "FieldOfView": 60.0, "NearClipPlane": 0.3 } } ### Response #### Success Response (200) - **result** (boolean) - Returns true if the settings are approximately equal. #### Response Example { "result": true } ``` -------------------------------- ### Implementing LensModifier Pipeline Methods Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFreeLookModifier.LensModifier.html Demonstrates the override methods for the camera pipeline, including BeforePipeline for state modification and lifecycle methods like Reset and Validate. ```csharp public override void BeforePipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue) { } public override void Reset(CinemachineVirtualCameraBase vcam) { } public override void Validate(CinemachineVirtualCameraBase vcam) { } ``` -------------------------------- ### Instantiate Objects in Unity Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFreeLook.html Offers multiple ways to instantiate objects in Unity, both synchronously and with generic type parameters. These methods support specifying position, rotation, parent transform, and scene for instantiation. ```csharp Object.Instantiate(Object, Vector3, Quaternion) Object.Instantiate(Object, Vector3, Quaternion, Transform) Object.Instantiate(Object) Object.Instantiate(Object, Scene) Object.Instantiate(T, InstantiateParameters) Object.Instantiate(T, Vector3, Quaternion, InstantiateParameters) Object.Instantiate(Object, Transform) Object.Instantiate(Object, Transform, bool) Object.Instantiate(T) Object.Instantiate(T, Vector3, Quaternion) Object.Instantiate(T, Vector3, Quaternion, Transform) Object.Instantiate(T, Transform) Object.Instantiate(T, Transform, bool) ``` -------------------------------- ### GET /CinemachineSmoothPath/EvaluateLocalOrientation Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineSmoothPath.html Retrieves the orientation of the curve at a specific point along the path. ```APIDOC ## GET /CinemachineSmoothPath/EvaluateLocalOrientation ### Description Returns the local orientation of the path at a given position, defined by the tangent, up, and roll vectors. ### Method GET ### Endpoint /CinemachineSmoothPath/EvaluateLocalOrientation ### Parameters #### Query Parameters - **pos** (float) - Required - Position along the path. ### Request Example GET /CinemachineSmoothPath/EvaluateLocalOrientation?pos=0.5 ### Response #### Success Response (200) - **orientation** (Quaternion) - The local orientation of the path. #### Response Example { "orientation": { "x": 0.0, "y": 0.707, "z": 0.0, "w": 0.707 } } ``` -------------------------------- ### GET /CinemachinePath/EvaluateLocalOrientation Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachinePath.html Retrieves the local-space orientation of the curve at a point along the path. ```APIDOC ## GET /CinemachinePath/EvaluateLocalOrientation ### Description Returns the orientation of the curve at a given point along the path, defined by tangent, up, and roll. ### Method GET ### Endpoint EvaluateLocalOrientation(float pos) ### Parameters #### Path Parameters - **pos** (float) - Required - Position along the path. Need not be normalized. ### Response #### Success Response (200) - **Quaternion** - Local-space orientation of the path. ``` -------------------------------- ### POST /OnTransitionFromCamera Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachinePOV.html Notifies the virtual camera that it is going live, allowing for internal state updates during the transition. ```APIDOC ## POST /OnTransitionFromCamera ### Description Notifies the virtual camera that it is going live. This method is called when the camera becomes the active camera in the Cinemachine pipeline. ### Method POST ### Endpoint /OnTransitionFromCamera ### Parameters #### Request Body - **fromCam** (ICinemachineCamera) - Required - The camera being deactivated. May be null. - **worldUp** (Vector3) - Required - Default world Up, set by the CinemachineBrain. - **deltaTime** (float) - Required - Delta time for time-based effects (ignore if <= 0). ### Response #### Success Response (200) - **result** (bool) - True if the vcam should do an internal update as a result of this call. ### Response Example { "result": true } ``` -------------------------------- ### Object Instantiation (Unity C#) Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineSequencerCamera.html Creates instances of objects with specified position, rotation, and parent. Supports generic types and instantiation parameters for flexible object creation. ```csharp Object.Instantiate(Object original, Vector3 position, Quaternion rotation); Object.Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent); Object.Instantiate(Object original); Object.Instantiate(Object original, Scene scene); Object.Instantiate(T original, InstantiateParameters parameters); Object.Instantiate(T original, Vector3 position, Quaternion rotation, InstantiateParameters parameters); Object.Instantiate(Object original, Transform parent); Object.Instantiate(Object original, Transform parent, bool instantiateInWorldSpace); Object.Instantiate(T original); Object.Instantiate(T original, Vector3 position, Quaternion rotation); Object.Instantiate(T original, Vector3 position, Quaternion rotation, Transform parent); Object.Instantiate(T original, Transform parent); Object.Instantiate(T original, Transform parent, bool instantiateInWorldSpace); ``` -------------------------------- ### CinemachineBrain State Property Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBrain.html Gets the current camera state at the current time. ```csharp public CameraState State { get; }ﺣ ``` -------------------------------- ### Implementing Pipeline Callbacks Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFreeLookModifier.TiltModifier.html Methods for handling camera state updates, initialization, and validation within the Cinemachine pipeline. ```csharp public override void AfterPipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue) { } public override void Reset(CinemachineVirtualCameraBase vcam) { } public override void Validate(CinemachineVirtualCameraBase vcam) { } ``` -------------------------------- ### GET /cinemachine/hard-look-at Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/manual/CinemachineHardLookAt.html Retrieves the configuration properties for the Hard Look At rotation control behavior. ```APIDOC ## GET /cinemachine/hard-look-at ### Description Retrieves the current settings for the Hard Look At component, which forces the camera to rotate to keep a target centered. ### Method GET ### Endpoint /cinemachine/hard-look-at ### Parameters #### Query Parameters - **target_id** (string) - Required - The unique identifier of the camera component. ### Request Example { "target_id": "cm_cam_01" } ### Response #### Success Response (200) - **look_at_offset** (vector3) - The offset from the LookAt target's origin in local space. #### Response Example { "look_at_offset": { "x": 0.0, "y": 1.5, "z": 0.0 } } ``` -------------------------------- ### GET /EvaluateTangent Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachinePathBase.html Calculates the tangent vector of the curve at a specific point along the path. ```APIDOC ## GET /EvaluateTangent ### Description Get the tangent of the curve at a point along the path. ### Method GET ### Endpoint /EvaluateTangent ### Parameters #### Query Parameters - **pos** (float) - Required - Position along the path. ### Response #### Success Response (200) - **Vector3** (object) - World-space direction of the path tangent. Length of the vector represents the tangent strength. ### Response Example { "x": 1.0, "y": 0.0, "z": 0.0 } ``` -------------------------------- ### Handle Component Lifecycle Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineDeoccluder.html Standard Unity lifecycle methods overridden to handle cleanup and initialization of the extension. ```csharp protected override void OnDestroy(); protected override void OnEnable(); ``` -------------------------------- ### Cinemachine Distance - Minimum Distance Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFramingTransposer.html Sets a limit on how close the camera can get to the target. ```csharp [Tooltip("Set this to limit how close to the target the camera can get.")] public float m_MinimumDistance ``` -------------------------------- ### Unity Object Base Methods and Properties (C#) Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineMixerEventsBase.html Demonstrates common methods and properties available on the base Unity Object class. This includes methods for object comparison, type checking, cloning, and accessing properties like 'name' and 'hideFlags'. ```csharp Object.ToString(); Object.name; Object.hideFlags; object.Equals(object, object); object.GetType(); object.MemberwiseClone(); object.ReferenceEquals(object, object); ``` -------------------------------- ### Cinemachine Distance - Maximum Distance Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFramingTransposer.html Sets a limit on how far the camera can get from the target. ```csharp [Tooltip("Set this to limit how far from the target the camera can get.")] public float m_MaximumDistance ``` -------------------------------- ### Configure Lookahead and Activation Behavior Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineComposer.html Settings for target lookahead smoothing, axis constraints, and camera activation behavior. ```csharp [Tooltip("Force target to center of screen when this camera activates.")] public bool m_CenterOnActivate; [Tooltip("If checked, movement along the Y axis will be ignored for lookahead calculations")] public bool m_LookaheadIgnoreY; [Tooltip("Controls the smoothness of the lookahead algorithm.")] [Range(0, 30)] public float m_LookaheadSmoothing; ``` -------------------------------- ### CinemachineCore.CameraActivatedEvent Declaration Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineCore.html Declares the CameraActivatedEvent, which fires when the current camera changes at the start of a blend. ```csharp public static ICinemachineCamera.ActivationEvent CameraActivatedEvent ``` -------------------------------- ### Instantiate Async Objects in Unity Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFreeLook.html Provides various overloads for asynchronously instantiating objects in Unity. These methods allow for flexible object creation with different parameters like parent transforms, positions, rotations, and instantiation configurations. ```csharp Object.InstantiateAsync(T) Object.InstantiateAsync(T, Transform) Object.InstantiateAsync(T, Vector3, Quaternion) Object.InstantiateAsync(T, Transform, Vector3, Quaternion) Object.InstantiateAsync(T, int) Object.InstantiateAsync(T, int, Transform) Object.InstantiateAsync(T, int, Vector3, Quaternion) Object.InstantiateAsync(T, int, ReadOnlySpan, ReadOnlySpan) Object.InstantiateAsync(T, int, Transform, Vector3, Quaternion) Object.InstantiateAsync(T, int, Transform, ReadOnlySpan, ReadOnlySpan) Object.InstantiateAsync(T, InstantiateParameters) Object.InstantiateAsync(T, int, InstantiateParameters) Object.InstantiateAsync(T, Vector3, Quaternion, InstantiateParameters) Object.InstantiateAsync(T, int, Vector3, Quaternion, InstantiateParameters) Object.InstantiateAsync(T, int, ReadOnlySpan, ReadOnlySpan, InstantiateParameters) ``` -------------------------------- ### Enum CinemachineTriggerAction.ActionSettings.TimeModes Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineTriggerAction.ActionSettings.TimeModes.html Defines how the start time for a trigger action is interpreted relative to the timeline. ```APIDOC ## Enum CinemachineTriggerAction.ActionSettings.TimeModes ### Description How to interpret the start time for a trigger action. ### Namespace Unity.Cinemachine ### Assembly Unity.Cinemachine.dll ### Syntax ```csharp public enum CinemachineTriggerAction.ActionSettings.TimeModes ``` ### Fields - **AfterNow** (TimeModes) - Offset after the current timeline time. - **BeforeNow** (TimeModes) - Offset before the current timeline time. - **FromEnd** (TimeModes) - Offset before the end of the timeline. - **FromStart** (TimeModes) - Offset after the start of the timeline. ``` -------------------------------- ### CinemachineTriggerAction.ActionSettings Constructor Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineTriggerAction.ActionSettings.html Initializes a new instance of the CinemachineTriggerAction.ActionSettings struct with a specified action mode. ```APIDOC ## ActionSettings(ActionModes) ### Description Standard Constructor. ### Parameters - **action** (CinemachineTriggerAction.ActionSettings.ActionModes) - Required - Action to set ``` -------------------------------- ### GET GetSignal Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.NoiseSettings.html Interface for raw signal provider to retrieve position and rotation impulse signals. ```APIDOC ## GET GetSignal ### Description Interface for raw signal provider to get the position and rotation impulse signals at a given time. ### Method GET ### Endpoint GetSignal ### Parameters #### Query Parameters - **timeSinceSignalStart** (float) - Required - Time at which to get signal value ### Response #### Success Response (200) - **pos** (Vector3) - The position impulse signal - **rot** (Quaternion) - The rotation impulse signal ``` -------------------------------- ### Accessing CinemachineImpulseChannels Singleton Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.Editor.CinemachineImpulseChannels.html Demonstrates how to retrieve the singleton instance of the impulse channels configuration. The Instance property ensures the asset exists, while InstanceIfExists returns null if it has not been created. ```csharp using Unity.Cinemachine; // Get the singleton instance, creating it if necessary var channels = CinemachineImpulseChannels.Instance; // Check if the instance exists without creating it var existingChannels = CinemachineImpulseChannels.InstanceIfExists; ``` -------------------------------- ### GET /CinemachineSmoothPath/EvaluateLocalPosition Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineSmoothPath.html Retrieves the local space position of a point along the path at a specified position. ```APIDOC ## GET /CinemachineSmoothPath/EvaluateLocalPosition ### Description Calculates and returns the local space position of a point along the smooth path based on the provided path position. ### Method GET ### Endpoint /CinemachineSmoothPath/EvaluateLocalPosition ### Parameters #### Query Parameters - **pos** (float) - Required - Position along the path (need not be normalized). ### Request Example GET /CinemachineSmoothPath/EvaluateLocalPosition?pos=0.5 ### Response #### Success Response (200) - **position** (Vector3) - The local position of the point along the path at the specified pos. #### Response Example { "position": { "x": 1.0, "y": 0.0, "z": 5.0 } } ``` -------------------------------- ### CinemachineTriggerAction.ActionSettings Constructor Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineTriggerAction.ActionSettings.html Initializes a new instance of the CinemachineTriggerAction.ActionSettings struct with a specified action mode. ```csharp public ActionSettings(CinemachineTriggerAction.ActionSettings.ActionModes action) ``` -------------------------------- ### Implementing IInputAxisProvider Interface Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.AxisState.IInputAxisProvider.html This snippet demonstrates the structure of a class implementing the IInputAxisProvider interface to provide custom axis values to a Cinemachine camera. ```csharp using Unity.Cinemachine; public class CustomInputProvider : MonoBehaviour, AxisState.IInputAxisProvider { public float GetAxisValue(int axis) { // Return custom input based on axis index (0=X, 1=Y, 2=Z) return 0.0f; } } ``` -------------------------------- ### Get SplineSettings Reference (C#) Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineSplineDolly.html Retrieves a reference to the embedded SplineSettings struct. This property is read-only. ```csharp public ref SplineSettings SplineSettings { get; } ``` -------------------------------- ### GET /CinemachinePath/EvaluateLocalPosition Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachinePath.html Retrieves the local-space position of a point along the path at a specific position value. ```APIDOC ## GET /CinemachinePath/EvaluateLocalPosition ### Description Calculates and returns the local-space position of a point along the path based on the provided position value. ### Method GET ### Endpoint EvaluateLocalPosition(float pos) ### Parameters #### Path Parameters - **pos** (float) - Required - Position along the path. Need not be normalized. ### Response #### Success Response (200) - **Vector3** - Local-space position of the point along the path at the specified pos. ``` -------------------------------- ### Managing Virtual Camera State and Transitions Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineCameraManagerBase.html Methods for controlling the camera's internal update cycle, forcing positions, and managing child camera hierarchies. ```csharp protected abstract CinemachineVirtualCameraBase ChooseCurrentCamera(Vector3 worldUp, float deltaTime); protected void FinalizeCameraState(float deltaTime); public override void ForceCameraPosition(Vector3 pos, Quaternion rot); public override void InternalUpdateCameraState(Vector3 worldUp, float deltaTime); public void InvalidateCameraCache(); public virtual bool IsLiveChild(ICinemachineCamera cam, bool dominantChildOnly = false); ``` -------------------------------- ### GET /GetRig Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineFreeLook.html Retrieves a specific child rig from the camera system based on the provided index. ```APIDOC ## GET /GetRig ### Description Get a child rig by index. ### Method GET ### Endpoint /GetRig ### Parameters #### Query Parameters - **i** (int) - Required - Rig index (0, 1, or 2) ### Response #### Success Response (200) - **rig** (CinemachineVirtualCamera) - The rig object, or null if index is invalid. ``` -------------------------------- ### CinemachineDeoccluder.ObstacleAvoidance.FollowTargetSettings Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.html Settings for resolving towards Follow target instead of LookAt. ```APIDOC ## CinemachineDeoccluder.ObstacleAvoidance.FollowTargetSettings ### Description Settings for resolving towards Follow target instead of LookAt. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Response Example N/A ``` -------------------------------- ### CinemachineBrain OutputCamera Property Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBrain.html Gets the Unity Camera component attached to this GameObject, which is controlled by the CinemachineBrain. ```csharp public Camera OutputCamera { get; }ﺣ ``` -------------------------------- ### Implement Custom Camera Blending with IBlender Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBlend.IBlender.html This snippet demonstrates how to implement the IBlender interface to define a custom interpolation strategy between two camera states. The GetIntermediateState method takes two ICinemachineCamera objects and a float t (0 to 1) to return the resulting CameraState. ```csharp using Unity.Cinemachine; public class CustomBlender : CinemachineBlend.IBlender { public CameraState GetIntermediateState(ICinemachineCamera CamA, ICinemachineCamera CamB, float t) { // Custom blending logic here // t ranges from 0 (CamA) to 1 (CamB) return CameraState.Lerp(CamA.State, CamB.State, t); } } ``` -------------------------------- ### CinemachineBrain Name Property Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineBrain.html Gets the name of this virtual camera, used when deciding how to blend to or from this camera. ```csharp public string Name { get; }ﺣ ``` -------------------------------- ### Implement Storyboard Pipeline Methods Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineStoryboard.html Overrides for the CinemachineExtension base class to manage virtual camera connections and execute rendering callbacks during the pipeline stage. ```csharp protected override void ConnectToVcam(bool connect) { // Implementation for connecting/disconnecting to virtual camera } protected override void PostPipelineStageCallback(CinemachineVirtualCameraBase vcam, CinemachineCore.Stage stage, ref CameraState state, float deltaTime) { // Implementation for rendering the image during the pipeline stage } ``` -------------------------------- ### CinemachineInputProvider Class Overview Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineInputProvider.html Details regarding the CinemachineInputProvider component, its inheritance, and its role in handling input for Cinemachine cameras. ```APIDOC ## Class CinemachineInputProvider ### Description This component serves as an add-on to override the legacy input system. It reads input using the UnityEngine.Input package API. It must be attached to a CinemachineVirtualCamera or FreeLook component to function. ### Inheritance - System.Object - UnityEngine.Object - UnityEngine.Component - UnityEngine.Behaviour - UnityEngine.MonoBehaviour - Cinemachine.CinemachineInputProvider ### Usage Notes - Requires the Input System Package to be installed. - If the Input System Package is not present, this behaviour remains inactive. - Users should drag the desired actions into the component inspector fields. ``` -------------------------------- ### GET /camera/state Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineCameraManagerBase.html Retrieves the current state of the virtual camera, including position and orientation data. ```APIDOC ## GET /camera/state ### Description Retrieves the CameraState object which holds all information necessary to position the Unity camera. ### Method GET ### Endpoint /camera/state ### Response #### Success Response (200) - **State** (CameraState) - The current output state of the virtual camera. #### Response Example { "State": { "Position": "(0, 1, -10)", "Orientation": "(0, 0, 0, 1)" } } ``` -------------------------------- ### OnTransitionFromCamera Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineVirtualCamera.html Handles the transition from another virtual camera. If transitioning from another vcam, it grabs the position from it. ```APIDOC ## OnTransitionFromCamera(ICinemachineCamera fromCam, Vector3 worldUp, float deltaTime) ### Description Handles the transition from another virtual camera. If transitioning from another vcam, it grabs the position from it. ### Method POST ### Endpoint N/A (Method within a class) ### Parameters - **fromCam** (ICinemachineCamera) - Required - The camera being deactivated. May be null. - **worldUp** (Vector3) - Required - Default world Up, set by the CinemachineBrain. - **deltaTime** (float) - Required - Delta time for time-based effects (ignore if less than or equal to 0). ### Overrides CinemachineVirtualCameraBase.OnTransitionFromCamera(ICinemachineCamera, Vector3, float) ``` -------------------------------- ### GET GetAxisValue Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.AxisState.IInputAxisProvider.html Retrieves the current value of a specific input axis (X, Y, or Z) from the provider. ```APIDOC ## GET GetAxisValue ### Description Retrieves the input value for the specified axis index (0 for X, 1 for Y, 2 for Z). ### Method GET ### Endpoint GetAxisValue(int axis) ### Parameters #### Path Parameters - **axis** (int) - Required - The axis index to query (0, 1, or 2). ### Response #### Success Response (200) - **value** (float) - The current input value of the queried axis. ### Response Example { "value": 0.75 } ``` -------------------------------- ### Handle Tool Lifecycle and Gizmos Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.Editor.CinemachineTool.html Methods for managing tool activation, deactivation, and drawing handles in the scene view. ```csharp public override void OnActivated(); public override void OnWillBeDeactivated(); public void OnDrawHandles(); ``` -------------------------------- ### Manage Camera Follow and LookAt Properties Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineCamera.html Properties for managing the camera's Follow and LookAt targets, allowing for dynamic assignment of transforms that the camera should track or orient towards. ```csharp public override Transform Follow { get; set; } public override Transform LookAt { get; set; } public override CameraState State { get; } ``` -------------------------------- ### CurrentTime Property Source: https://docs.unity3d.com/Packages/com.unity.cinemachine%403.1/api/Unity.Cinemachine.CinemachineCore.html Gets the current time, taking any active time override into account. This is a replacement for Time.time. ```APIDOC ## CurrentTime Property ### Description Replacement for Time.time, taking CurrentTimeTimeOverride into account. ### Declaration ```csharp public static float CurrentTime { get; } ``` ### Property Value - **Type**: float - **Description**: The current time. ```