### ResetSize() Source: http://www.procamera2d.com/user-guide/core Resets the camera size to the start value. ```APIDOC ## ResetSize() ### Description Resets the camera size to the start value. ### Signature `void ResetSize()` ``` -------------------------------- ### ResetExtensions() Source: http://www.procamera2d.com/user-guide/core Resets all active extensions to their start values. ```APIDOC ## ResetExtensions() ### Description Resets all active extensions to their start values. Note that individual extensions can also be reset using their respective 'OnReset' method. ### Signature `void ResetExtensions()` ``` -------------------------------- ### Reset Camera Size Source: http://www.procamera2d.com/user-guide/core Resets the camera size to its initial starting value. ```csharp ResetSize() ``` -------------------------------- ### Reset Camera Extensions Source: http://www.procamera2d.com/user-guide/core Resets all active extensions to their starting values. Individual extensions can also be reset via their OnReset method. ```csharp ResetExtensions() ``` -------------------------------- ### Get Camera Target Source: http://www.procamera2d.com/user-guide/core Retrieves the CameraTarget component associated with a specific transform. ```csharp GetCameraTarget(Transform targetTransform) ``` -------------------------------- ### Create a Custom Extension Source: http://www.procamera2d.com/user-guide/custom-extensions-triggers Extends BasePC2D to apply camera influence based on user input. ```csharp using UnityEngine; using Com.LuisPedroFonseca.ProCamera2D; public class ExtensionExample : BasePC2D { public float ViewDistance = 2f; void Update() { if(Input.GetKey(KeyCode.DownArrow)) { ProCamera2D.ApplyInfluence(new Vector2(0, -ViewDistance)); } } } ``` -------------------------------- ### Import ProCamera2D Namespace Source: http://www.procamera2d.com/user-guide/core Include this directive at the top of any class that interacts with ProCamera2D. ```csharp using Com.LuisPedroFonseca.ProCamera2D; ``` -------------------------------- ### Access ProCamera2D Instance Source: http://www.procamera2d.com/user-guide/core Use the static instance to access methods and parameters at runtime. ```csharp ProCamera2D.Instance.AddCameraTarget(myTransform); ``` -------------------------------- ### Update Screen Size Source: http://www.procamera2d.com/user-guide/core Manually adjusts the camera size in world units. ```csharp UpdateScreenSize(float newSize, float duration = 0f) ``` -------------------------------- ### Access Shake Instance Source: http://www.procamera2d.com/user-guide/extension-shake Use the static instance of ProCamera2DShake to invoke shake methods. ```csharp ProCamera2DShake.Instance.Shake(); ``` -------------------------------- ### Add Camera Target Source: http://www.procamera2d.com/user-guide/core Registers a new target for the camera to follow during runtime. ```csharp AddCameraTarget(Transform targetTransform, float targetInfluenceH = 1f, float targetInfluenceV = 1f, float duration = 0f) ``` -------------------------------- ### Move Camera Instantly Source: http://www.procamera2d.com/user-guide/core Teleports the camera to a specific position. ```csharp MoveCameraInstantlyToPosition(Vector2 cameraPos) ``` -------------------------------- ### Shake(string presetName) / Shake(int presetIndex) Source: http://www.procamera2d.com/user-guide/extension-shake Triggers a camera shake effect based on a pre-configured preset. ```APIDOC ## Shake(string presetName) / Shake(int presetIndex) ### Description Triggers a camera shake effect using a preset defined in the Shake Preset Editor. ### Parameters - **presetName** (string) - The name of the shake preset to use. - **presetIndex** (int) - The index of the shake preset to use. ``` -------------------------------- ### Shake(float duration, Vector2 strength, int vibrato, float randomness, float initialAngle, Vector3 rotation, float smoothness) Source: http://www.procamera2d.com/user-guide/extension-shake Triggers a camera shake effect with custom parameters. ```APIDOC ## Shake(float duration, Vector2 strength, int vibrato, float randomness, float initialAngle, Vector3 rotation, float smoothness) ### Description Triggers a camera shake effect using the specified parameters. ### Parameters - **duration** (float) - The duration of the shake (>0). - **strength** (Vector2) - The shake strength on each axis. - **vibrato** (int) - Indicates how much the camera will vibrate. - **randomness** (float) - Indicates how random the shake will be. - **initialAngle** (float) - The initial shaking angle. - **rotation** (Vector3) - The maximum rotation the camera will reach. - **smoothness** (float) - The smoothness of the shake. Lower numbers provide more aggressive shakes. ``` -------------------------------- ### Trigger Shake with Parameters Source: http://www.procamera2d.com/user-guide/extension-shake Manually trigger a camera shake by specifying duration, strength, vibrato, randomness, initial angle, rotation, and smoothness. ```csharp Shake(float duration, Vector2 strength, int vibrato, float randomness, float initialAngle, Vector3 rotation, float smoothness) ``` -------------------------------- ### Create a Custom Trigger Source: http://www.procamera2d.com/user-guide/custom-extensions-triggers Extends BaseTrigger to handle camera entry and exit events, overriding EnteredTrigger and ExitedTrigger methods. ```csharp using UnityEngine; using Com.LuisPedroFonseca.ProCamera2D; public class TriggerExample : BaseTrigger { public Color EnterColor; public Color ExitColor; protected override void EnteredTrigger() { base.EnteredTrigger(); ProCamera2D.GameCamera.backgroundColor = EnterColor; } protected override void ExitedTrigger() { base.ExitedTrigger(); ProCamera2D.GameCamera.backgroundColor = ExitColor; } } ``` -------------------------------- ### UpdateScreenSize Source: http://www.procamera2d.com/user-guide/core Manually adjusts the camera size at runtime. ```APIDOC ## UpdateScreenSize(float newSize, float duration) ### Description Manually adjusts the size of the camera at runtime. ### Parameters - **newSize** (float) - Required - Half of the wanted size in world units - **duration** (float) - Optional - How long it should take to reach the provided size ``` -------------------------------- ### ApplyInfluence Source: http://www.procamera2d.com/user-guide/core Applies a given influence to the camera during one frame. ```APIDOC ## ApplyInfluence(Vector2 influence) ### Description Applies the given influence to the camera during one frame. ### Parameters - **influence** (Vector2) - Required - The vector representing the influence to be applied ``` -------------------------------- ### Center Camera on Targets Source: http://www.procamera2d.com/user-guide/core Instantly repositions the camera to the current location of the targets. ```csharp CenterOnTargets() ``` -------------------------------- ### CenterOnTargets() Source: http://www.procamera2d.com/user-guide/core Instantly moves the camera to the targets' position. ```APIDOC ## CenterOnTargets() ### Description Instantly moves the camera to the targets' position. ### Signature `void CenterOnTargets()` ``` -------------------------------- ### Trigger Shake via Preset Source: http://www.procamera2d.com/user-guide/extension-shake Trigger a pre-configured shake effect using either the name or the index of the preset. ```csharp Shake(string presetName) ``` ```csharp Shake(int presetIndex) ``` -------------------------------- ### Reset Source: http://www.procamera2d.com/user-guide/core Resets camera movement, size, and extensions. ```APIDOC ## Reset(bool centerOnTargets, bool resetSize, bool resetExtensions) ### Description Resets the camera movement and size and also all of its extensions to their start values. ### Parameters - **centerOnTargets** (bool) - Optional - If true, the camera will instantly move to your targets position - **resetSize** (bool) - Optional - If true, resets the camera size to the start value - **resetExtensions** (bool) - Optional - If true, resets all active extensions to their start values ``` -------------------------------- ### Stop All Shakes Source: http://www.procamera2d.com/user-guide/extension-shake Halt all currently active camera shake effects. ```csharp StopShaking() ``` -------------------------------- ### Reset Camera State Source: http://www.procamera2d.com/user-guide/core Resets movement, size, and extensions to their initial values. ```csharp Reset(bool centerOnTargets = true, bool resetSize = true, bool resetExtensions = true) ``` -------------------------------- ### Apply Influences Timed Source: http://www.procamera2d.com/user-guide/core Applies multiple influences over specified durations. ```csharp ApplyInfluencesTimed(Vector2[] influences, float[] durations) ``` -------------------------------- ### ApplyInfluencesTimed Source: http://www.procamera2d.com/user-guide/core Applies an array of different influences over specific durations. ```APIDOC ## ApplyInfluencesTimed(Vector2[] influences, float[] durations) ### Description Applies an array of different influences and their respective durations. ### Parameters - **influences** (Vector2[]) - Required - An array of Vector2's with the influences to be applied - **durations** (float[]) - Required - An array of float's with the duration of each corresponding influence ``` -------------------------------- ### AddCameraTarget Source: http://www.procamera2d.com/user-guide/core Adds a new camera target during runtime. ```APIDOC ## AddCameraTarget(Transform targetTransform, float targetInfluenceH, float targetInfluenceV, float duration) ### Description Adds a new camera target during runtime. ### Parameters - **targetTransform** (Transform) - Required - The transform component of the target - **targetInfluenceH** (float) - Optional - The influence this target horizontal position should have - **targetInfluenceV** (float) - Optional - The influence this target vertical position should have - **duration** (float) - Optional - The time it takes for this target to reach its influence ``` -------------------------------- ### MoveCameraInstantlyToPosition Source: http://www.procamera2d.com/user-guide/core Instantly moves the camera to a specific position. ```APIDOC ## MoveCameraInstantlyToPosition(Vector2 cameraPos) ### Description Manually moves the camera to a specific position. ### Parameters - **cameraPos** (Vector2) - Required - The final position of the camera ``` -------------------------------- ### StopShaking() Source: http://www.procamera2d.com/user-guide/extension-shake Stops all currently active camera shakes. ```APIDOC ## StopShaking() ### Description Immediately stops all current shake effects being applied to the camera. ``` -------------------------------- ### Reset Camera Movement Source: http://www.procamera2d.com/user-guide/core Cancels any active camera movement easing. ```csharp ResetMovement() ``` -------------------------------- ### Apply Influence Source: http://www.procamera2d.com/user-guide/core Applies a specific influence to the camera for a single frame. ```csharp ApplyInfluence(Vector2 influence) ``` -------------------------------- ### ResetMovement Source: http://www.procamera2d.com/user-guide/core Cancels existing camera movement easing. ```APIDOC ## ResetMovement() ### Description Cancels any existing camera movement easing. ``` -------------------------------- ### Adjust Camera Target Influence Source: http://www.procamera2d.com/user-guide/core Modifies the influence weight of an existing camera target at runtime. ```csharp AdjustCameraTargetInfluence(CameraTarget cameraTarget, float targetInfluenceH, float targetInfluenceV, float duration = 0f) ``` -------------------------------- ### GetCameraTarget Source: http://www.procamera2d.com/user-guide/core Retrieves the CameraTarget component from a transform. ```APIDOC ## GetCameraTarget(Transform targetTransform) ### Description Gets the corresponding CameraTarget from an object’s transform. ### Parameters - **targetTransform** (Transform) - Required - The transform component of the target ``` -------------------------------- ### AdjustCameraTargetInfluence Source: http://www.procamera2d.com/user-guide/core Adjusts the influence of a target at runtime. ```APIDOC ## AdjustCameraTargetInfluence(CameraTarget cameraTarget, float targetInfluenceH, float targetInfluenceV, float duration) ### Description Adjusts the influence that a target has at runtime. ### Parameters - **cameraTarget** (CameraTarget) - Required - The CameraTarget of the target - **targetInfluenceH** (float) - Required - The horizontal influence - **targetInfluenceV** (float) - Required - The vertical influence - **duration** (float) - Optional - The time it takes for this target to reach its influence ``` -------------------------------- ### Remove Camera Target Source: http://www.procamera2d.com/user-guide/core Stops the camera from following a specific target. ```csharp RemoveCameraTarget(Transform targetTransform, float duration = 0f) ``` -------------------------------- ### RemoveCameraTarget Source: http://www.procamera2d.com/user-guide/core Stops following a specific camera target. ```APIDOC ## RemoveCameraTarget(Transform targetTransform, float duration) ### Description Stops following a target. ### Parameters - **targetTransform** (Transform) - Required - The transform component of the target - **duration** (float) - Optional - The time it takes for this target to reach a zero influence ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.