### Setting Up SteamVR Input Actions in Unity Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This guide outlines the initial steps to configure input actions for SteamVR within a Unity project, involving copying example JSONs and generating actions through the dedicated SteamVR Input window. ```APIDOC Procedure: Setting Up SteamVR Input Actions 1. Open the SteamVR Input window (under the Window Menu). 2. Click 'yes' to copy example jsons. 3. Click 'Save and Generate' to create input actions. ``` -------------------------------- ### [CameraRig] Prefab: Default VR Camera Setup Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The [CameraRig] prefab represents the default camera setup used in the example scene. It consists of a standard Unity camera with the SteamVR_Camera component added and expanded. It also includes a full set of Tracked Devices to display and follow connected VR devices like controllers, base stations, and cameras. ```APIDOC Prefab: [CameraRig] Description: Default camera setup used by the example scene. Components: - Default Unity camera with SteamVR_Camera component (expanded). - Full set of Tracked Devices (displays and follows connected devices like controllers, base stations, cameras). ``` -------------------------------- ### Basic Examples of Skeletal API Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Indicates that basic examples of the Skeletal API have been added to the Interaction System. ```APIDOC API: Skeletal API Description: Provides functionality for skeleton-based interactions. Examples: Basic usage examples are now included in the InteractionSystem. ``` -------------------------------- ### Displaying SteamVR Binding Hints Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Provides methods to display SteamVR binding hints to the user through a SteamVR interface, showing what actions are mapped to what bindings. This functionality replaces opening the binding window through the default browser. ```APIDOC SteamVR_Input.ShowBindingHints(Action) Action: The specific action for which to show binding hints. SteamVR_Input.ShowBindingHints(ActionSet) ActionSet: The specific action set for which to show binding hints. SteamVR_Input.ShowBindingHintsForActiveActionSets() Description: Shows binding hints for all currently active action sets. ``` -------------------------------- ### openvr_api.cs: Native SteamVR SDK Wrapper Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This C# script is a direct wrapper for the native SteamVR SDK, mirroring SteamVR.h. It exposes all SteamVR functionality and is the only required script for core SDK support. Users are advised not to modify this file and to keep it synchronized with the associated openvr_api DLL. ```APIDOC File: Assets/Plugins/openvr_api.cs Description: Direct wrapper for the native SteamVR SDK (mirrors SteamVR.h). Functionality: Exposes all SteamVR functionality. Notes: Only required script for SDK support. Not recommended to modify. Should be kept in sync with openvr_api.dll. ``` -------------------------------- ### SteamVR_Settings Configuration Options Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Mentions that some configuration options were moved into SteamVR_Settings for better organization. ```APIDOC Class: SteamVR_Settings Purpose: Contains various SteamVR configuration options. Note: Some settings previously in the settings window have been moved here. ``` -------------------------------- ### [Status] Prefab: Demonstration Escape Menu Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The [Status] prefab is for demonstration purposes only, adding an escape menu to the scene. It utilizes the SteamVR_Overlay component, which is noted for being rather expensive in terms of rendering performance. ```APIDOC Prefab: [Status] Description: Demonstration-only prefab that adds an escape menu to the scene. Components: - Uses SteamVR_Overlay component. Notes: Rendering-wise, it is rather expensive. ``` -------------------------------- ### SteamVR.cs: Subsystem Initialization and Access Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This script handles the initialization and shutdown of SteamVR subsystems. The SteamVR.instance property provides access to the initialized VR system, which may return null on failure. SteamVR.active can be used to check if VR is initialized without attempting to initialize it. ```APIDOC File: Assets/SteamVR/Scripts/SteamVR.cs Description: Handles initialization and shutdown of SteamVR subsystems. Access: SteamVR.instance: Accesses the SteamVR instance (can be null if initialization fails). SteamVR.active: Determines if VR has been initialized without attempting initialization. ``` -------------------------------- ### Manage Action Origin and Binding Hints Visibility Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR_Action` class provides methods to show or hide action origins, while `SteamVR_ActionSet` offers methods to display or conceal binding hints for action sets. ```APIDOC SteamVR_Action.ShowOrigins() SteamVR_Action.HideOrigins() SteamVR_ActionSet.ShowBindingHints() SteamVR_ActionSet.HideBindingHints() ``` -------------------------------- ### Simplified Hand Follow Transform Member Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `handFollowTransform` member has been simplified from three variables to a single variable, streamlining its usage and reducing complexity. ```APIDOC handFollowTransform ``` -------------------------------- ### Check SteamVR Startup Frame Status Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR_Input.isStartupFrame` property returns true for a few frames around startup, temporarily addressing startup errors until a dedicated SteamVR API is available. ```APIDOC SteamVR_Input.isStartupFrame ``` -------------------------------- ### Managing SteamVR Action Set Activation Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Details the consolidated action set activation method, replacing separate primary and secondary activation calls with a single, more flexible 'Activate' call that supports activating multiple sets concurrently. ```APIDOC actionSet.Activate(priority: int = 0) priority: The priority level for the action set. Higher priority sets override lower priority sets for conflicting bindings. ``` -------------------------------- ### SteamVR Editor Application Key Configuration Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Describes the change from a single 'appKey' to a dedicated 'editorAppKey' for SteamVR settings, ensuring proper binding behavior for builds separate from Steam while allowing editor-specific identification. ```APIDOC SteamVR_Setting.editorAppKey: string Replaces SteamVR_Setting.appKey. Used for editor-specific identification. Builds run separate from Steam will have their own autogenerated app key. ``` -------------------------------- ### Extensive String Access for SteamVR Actions Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Provides an overview of new utility methods for retrieving SteamVR actions and their states using string names and input sources, offering more dynamic access. ```APIDOC SteamVR_Input.GetAction(actionName: string) SteamVR_Input.GetState(actionName: string, inputSource: string) SteamVR_Input.GetFloat(actionName: string, inputSource: string) SteamVR_Input.GetVector2(actionName: string, inputSource: string) ``` -------------------------------- ### Unrestricted Input Source Shortcuts Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt A new shortcut has been introduced for accessing action states without specifying a particular input source. `booleanAction.state` now provides a concise way to retrieve the state, equivalent to accessing `booleanAction[SteamVR_Input_Sources.Any].state`, streamlining common access patterns. ```C# booleanAction.state; // Equivalent to booleanAction[SteamVR_Input_Sources.Any].state; ``` -------------------------------- ### Implementing OnGUI with SteamVR Camera Overlay Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Demonstrates the pattern for using Unity's OnGUI with SteamVR_Camera's overlay texture. It's crucial to set and restore RenderTexture.active to ensure proper rendering and avoid conflicts, especially when other cameras render to the same texture. ```C# // Example pattern for OnGUI with SteamVR_Camera's overlay texture void OnGUI() { RenderTexture originalActive = RenderTexture.active; // Set the active render texture to SteamVR_Camera's overlay texture // (Specific access method may vary, e.g., SteamVR_Camera.instance.overlayTexture) RenderTexture.active = /* SteamVR_Camera's overlay texture */; // Your OnGUI drawing code here // Example: GUI.Label(new Rect(10, 10, 200, 30), "SteamVR Overlay Content"); // Restore the original active render texture RenderTexture.active = originalActive; } ``` -------------------------------- ### SteamVR_Utils.cs: Utility Functions for SteamVR API Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This script provides various utility functions for working with the SteamVR API in Unity. It includes a simple event system, a RigidTransform class for vector/quaternion pairs, matrix conversions, and other helpful functions to streamline development. ```APIDOC File: Assets/SteamVR/Scripts/SteamVR_Utils.cs Description: Provides various utility functions for SteamVR API in Unity. Includes: - Simple event system. - RigidTransform class (for vector/quaternion pairs). - Matrix conversions. - Other useful functions. ``` -------------------------------- ### Configure SteamVR Tracking Origin at Runtime Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR.settings.trackingOrigin` property allows runtime configuration of the universe origin, automatically adjusting all pose origins and the compositor origin (HMD). ```APIDOC SteamVR.settings.trackingOrigin ``` -------------------------------- ### SteamVR_ActivateActionSetOnLoad API: initialPriority Property (v2.7.1) Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Version 2.7.1 introduces an `initialPriority` property to `SteamVR_ActivateActionSetOnLoad`, allowing developers to specify the activation priority of action sets when they are loaded. ```APIDOC Class: SteamVR_ActivateActionSetOnLoad Property: initialPriority Type: (Implicitly int or enum for priority) Description: Specifies the initial priority for activating action sets. Availability: Added in SteamVR Unity Plugin v2.7.1. ``` -------------------------------- ### Configuring Interactable Hand Snapping Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Explains how Interactables can instruct hands to snap to a specified transform upon attachment, controlling position and/or rotation. ```APIDOC Interactable: handFollowTransform: Transform description: The transform to snap the hand to on attach. handFollowTransformPosition: bool description: If true, snaps the hand's position to handFollowTransform. handFollowTransformRotation: bool description: If true, snaps the hand's rotation to handFollowTransform. ``` -------------------------------- ### SteamVR_RenderModel.cs: Dynamic Render Model Creation Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This script dynamically creates associated SteamVR-provided models for tracked objects. It allows for visual representation of tracked devices within the VR environment. A full list of available override models can be found in the SteamVR Runtime Path's resources/rendermodels directory. ```APIDOC File: Assets/SteamVR/Scripts/SteamVR_RenderModel.cs Description: Dynamically creates SteamVR-provided models for tracked objects. Reference: /resources/rendermodels for full list of overrides. ``` -------------------------------- ### Subscribing to SteamVR Action Events Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt C# events have been added to all SteamVR actions, providing autocomplete support for event handlers. This allows developers to easily subscribe to action state changes, such as `onStateDown`, which will auto-generate a method with named variables for convenience. ```C# booleanAction[source].onStateDown += yourMethod; ``` -------------------------------- ### Assigning Default SteamVR Actions and ActionSets Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Illustrates the new method for assigning default SteamVR actions and action sets directly, replacing the old Scriptable Object approach. This change significantly improves generation speed. ```C# public SteamVR_Action_Pose poseAction = SteamVR_Input.GetAction("Pose"); ``` ```C# public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.__actions_default_in_InteractUI; ``` -------------------------------- ### [SteamVR] Prefab: Global SteamVR Settings Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The [SteamVR] object controls global settings for SteamVR, most notably the Tracking Space. It supports legacy projects by allowing the view to be automatically centered on startup if not configured, or to use the seated calibrated position. ```APIDOC Prefab: [SteamVR] Description: Controls global settings for SteamVR. Key Setting: Tracking Space. Legacy Support: - Automatically centers view on startup if not configured. - Uses seated calibrated position. ``` -------------------------------- ### SteamVR_Input_References Asset Relocation Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Informs users that the SteamVR_Input_References asset has been moved to the generated folder to prevent overwrites during plugin updates, with instructions for prior beta users. ```APIDOC Asset: SteamVR_Input_References.asset Location: Moved to generated folder (previously Assets/SteamVR/Resources/) Note: Prior beta users should delete the old asset. ``` -------------------------------- ### Direct Action Access on ActionSets Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Explains the simplified access pattern for in-actions and out-actions directly on the action set, removing the intermediate 'inActions' and 'outActions' properties. Collisions are handled by prepending 'in_' or 'out_'. ```C# // Old way: // SteamVR_Input._default.inActions.GripGrab // New way: SteamVR_Input._default.GripGrab ``` -------------------------------- ### Accessing Localized Names for SteamVR Actions Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Demonstrates how to retrieve localized names for device components associated with SteamVR actions, allowing for more user-friendly display. ```APIDOC SteamVR_Input.GetLocalizedName(parts: string = "all") SteamVR_Action_In.GetLocalizedName(parts: string = "all") parts: Optional string specifying which parts of the name to return (e.g., "device", "component", "all"). ``` -------------------------------- ### SteamVR Input API: New Body Part Input Sources (v2.8.0) Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Version 2.8.0 expands the available input sources to include specific body parts, offering more granular tracking and interaction possibilities for VR applications. ```APIDOC Enum/Property: Input Sources New Values: - knee - elbow - ankle - wrist Description: These new input sources allow for more granular tracking and interaction based on specific body part movements. Availability: Added in SteamVR Unity Plugin v2.8.0. ``` -------------------------------- ### New Indexer-Style Action Data Access Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This major change introduces a more convenient indexer and property-style access for action data. Developers can now use `booleanAction[source].stateDown` instead of method calls, or simply `booleanAction.stateDown` for any input source, significantly simplifying code readability and usage. ```C# Old: booleanAction.GetStateDown(SteamVR_Input_Sources.LeftHand); New (specific source): booleanAction[SteamVR_Input_Sources.LeftHand].stateDown; New (any source): booleanAction.stateDown; ``` -------------------------------- ### Configuring Interactable Hand Behavior Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Details new properties for Interactables to control hand visibility, trigger animations, and temporarily adjust range of motion upon pickup. ```APIDOC Interactable: hideHandOnAttach: bool description: If true, hides the hand model when an object is attached. handAnimationOnPickup: int description: An integer value that triggers an Animator.SetInt call on the hand's Animator when an object is picked up. setRangeOfMotionOnPickup: bool description: If true, temporarily sets the range of motion while an object is attached. ``` -------------------------------- ### SteamVR_Input Class Update Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Announces that SteamVR_Input is no longer a MonoBehaviour, resolving scene transition and event subscription issues. ```APIDOC Class: SteamVR_Input Change: No longer inherits from MonoBehaviour. Impact: Fixes scene transition and event subscription issues. ``` -------------------------------- ### SteamVR_Actions API: GetActionBindingInfo Support (v2.8.1) Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Introduced in version 2.8.1, this API update adds support for the `GetActionBindingInfo` method across all `SteamVR_Actions`, enabling developers to programmatically retrieve binding information for actions. ```APIDOC Class: SteamVR_Actions Method: GetActionBindingInfo() Description: Provides support for retrieving action binding information. Availability: Added in SteamVR Unity Plugin v2.8.1. ``` -------------------------------- ### Added Events to SteamVR_Behaviour_Skeleton Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Several new events have been added to the `SteamVR_Behaviour_Skeleton` component, providing more opportunities for custom logic and interaction within skeletal behaviors. ```APIDOC SteamVR_Behaviour_Skeleton events ``` -------------------------------- ### SteamVR API: ControllerButtonHints URP Fix (v2.7.1) Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This fix in version 2.7.1 addresses compatibility issues with `ControllerButtonHints` when used in projects utilizing the Universal Render Pipeline (URP), improving the display and functionality of controller hints. ```APIDOC Component/Class: ControllerButtonHints Description: Fixes compatibility issues with the Universal Render Pipeline (URP). Impact: Ensures correct display of controller button hints in URP projects. Availability: Fixed in SteamVR Unity Plugin v2.7.1. ``` -------------------------------- ### Refactoring SteamVR Action Properties Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This major breaking change moves generated action properties from the legacy `SteamVR_Input` class to the new `SteamVR_Actions` class. This refactoring supports assembly definition files and introduces friendlier naming conventions, requiring updates to existing action references in projects. ```APIDOC Old: SteamVR_Input.__actions_default_in_GripGrab New: SteamVR_Actions.default_GripGrab ``` -------------------------------- ### OnState Event for Boolean Actions Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt A new `onState` event has been added to Boolean actions. This event fires specifically when the Boolean action's state becomes `true`, providing a direct and efficient way to react to action activation without continuous polling. ```APIDOC booleanAction.onState += yourMethod; ``` -------------------------------- ### Configuring SteamVR Action Manifest Location for Publishing Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This snippet explains how to specify the action manifest location on the Steamworks partner site for SteamVR Input applications, detailing the updated path for plugin versions 2.3.3 and above. ```APIDOC Configuration: SteamVR Input Action Manifest Location - Steamworks Partner Site: Application settings -> Virtual Reality Section - Designate title as 'SteamVR Input application'. - Set action manifest location: - Older versions: Next to the executable. - Versions 2.3.3+: [GameName]_Data/StreamingAssets/SteamVR/actions.json ``` -------------------------------- ### SteamVR_TrackedObject.cs: Tracking for VR Objects Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This component enables tracking for any object in a VR scene. The HMD automatically has one set up. For controllers, users select the index of the object to map. Objects with this component should generally be parented to the camera's 'origin' object for consistent tracking space, though an alternative 'origin' can be specified within the component itself. ```APIDOC File: Assets/SteamVR/Scripts/SteamVR_TrackedObject.cs Description: Adds tracking support to any object. Usage: - HMD has one automatically. - For controllers, select the object's index to map. Parenting: - Generally parent to camera's 'origin' object for consistent tracking space. - 'origin' can be specified within the TrackedObject itself if inconvenient. ``` -------------------------------- ### Setting Skeleton Hand Range of Motion Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Introduces a method to blend the skeleton's range of motion for hands, allowing dynamic adjustment over time. ```APIDOC Hand: SetSkeletonRangeOfMotion(rangeOfMotion: float, blendTime: float): void rangeOfMotion: The target range of motion value. blendTime: The time over which to blend to the new range of motion. ``` -------------------------------- ### SteamVR_Overlay Component for 2D Content Rendering Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The SteamVR_Camera's Overlay support has been refactored into a separate SteamVR_Overlay component. This component can be added to any object in a scene to render 2D content on a virtual curved surface. Users should set its Texture to None in scenes where it's not desired. ```APIDOC Component: SteamVR_Overlay Description: Renders 2D content in VR on a virtual curved surface. Usage: Add to any scene object. Properties: Texture: Set to None to prevent rendering. Notes: Uses a special render path for increased fidelity. Expensive rendering-wise. Should be dragged into Hierarchy window for default position. ``` -------------------------------- ### Specify Skeletal Summary Data Type Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR_Action_Skeleton.summaryDataType` property specifies whether to use animation data or device data for skeletal summaries. Device data may offer faster performance but could differ from animation data. ```APIDOC SteamVR_Action_Skeleton.summaryDataType ``` -------------------------------- ### DefaultInputAction Attribute for Action Generation Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Introduces the DefaultInputAction attribute, which automatically assigns actions during action generation. ```APIDOC Attribute: DefaultInputAction Purpose: Automatically assigns actions during action generation. ``` -------------------------------- ### Handling SteamVR Events Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Details how to register and unregister handlers for various SteamVR events using SteamVR_Events..Listen and Remove. It's recommended to manage event subscriptions in OnEnable and OnDisable for proper lifecycle management. ```APIDOC SteamVR_Events: .Listen(handler: Action<...>) Registers a handler for a specific SteamVR event. Parameters: handler: The delegate method to be called when the event fires. .Remove(handler: Action<...>) Unregisters a previously registered event handler. Parameters: handler: The delegate method to be removed. Event Types: Initializing: Description: Sent when HMD tracking status changes to or from Uninitialized. Signature: Action (bool: true if initializing, false if de-initializing) Calibrating: Description: Sent when starting or stopping calibration. Signature: Action (bool: true if calibrating, false if calibration stopped) OutOfRange: Description: Sent when losing or reacquiring absolute positional tracking. Signature: Action (bool: true if out of range, false if reacquired) DeviceConnected: Description: Sent when devices are connected or disconnected. Signature: Action (int: device index, bool: true if connected, false if disconnected) Recommended Pattern: void OnEnable() { SteamVR_Events.Initializing.Listen(OnInitializing); // ... listen to other events } void OnDisable() { SteamVR_Events.Initializing.Remove(OnInitializing); // ... remove other events } void OnInitializing(bool isInitializing) { // Handle event } ``` -------------------------------- ### SteamVR_Behaviour_ActionType Event Changes Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Events from `SteamVR_Behaviour_ActionType` components now correctly send the behaviour component itself instead of the action. C# style events have also been added to these components. ```APIDOC SteamVR_Behaviour_ActionType events ``` -------------------------------- ### Attaching Objects to Hand Offset Point Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Describes the ability to attach an object to a specific offset point relative to the Hand. ```APIDOC Hand: ObjectAttachmentPoint: Transform description: A transform representing a specific offset point from the Hand for object attachment. ``` -------------------------------- ### SteamVR_Behaviour Component on Player Prefab Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR_Behaviour` component has been added to the Player prefab in the Interaction System, making it easier to set its `DoNotDestroy` value for persistent behavior. ```APIDOC SteamVR_Behaviour component (on Player prefab) ``` -------------------------------- ### Checking SteamVR Mode for Game Launch Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt For games released on Steam that use the Steamworks SDK, developers should check ISteamUtils::IsSteamRunningInVRMode() to determine if the game should automatically launch into VR mode. ```APIDOC ISteamUtils: IsSteamRunningInVRMode(): bool Description: Checks if Steam is currently running in VR mode. Return Type: bool true: Steam is running in VR mode. false: Steam is not running in VR mode. Usage: if (SteamManager.Initialized && SteamUtils.IsSteamRunningInVRMode()) { // Launch into VR mode } else { // Launch into desktop mode or prompt user } ``` -------------------------------- ### Add Controller Assignment Before Identification Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt A new property, `assignAllBeforeIdentified`, has been added to the `SteamVR_Controller` class. This property allows controllers to be assigned within the system before they are definitively identified as either a left or right controller, improving flexibility in controller management. This feature was suggested by GitHub user @chrwoizi. ```APIDOC Class: SteamVR_Controller ``` -------------------------------- ### Interactable Hovering Status and Hand Access Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `Interactable.isHovering` property now accurately reports when a hand is hovering over an interactable. A new associated field, `Interactable.hoveringHand`, provides direct access to the hovering hand. ```APIDOC Interactable.isHovering Interactable.hoveringHand ``` -------------------------------- ### Delta Parameter for Axis Behaviour Events Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Behavior events for `Single`, `Vector2`, and `Vector3` actions now include a `delta` parameter. This provides information about the change in axis value since the last frame, which is particularly useful for implementing incremental updates or velocity-based interactions. ```APIDOC onAxis(value: float, delta: float) // For Single actions onAxis(value: Vector2, delta: Vector2) // For Vector2 actions onAxis(value: Vector3, delta: Vector3) // For Vector3 actions ``` -------------------------------- ### SteamVR_Camera.cs: VR Support for Unity Cameras Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This component adds VR support to existing Unity camera objects. It renders scenes at a higher resolution off-screen to combat distortion, sharing a single static render texture across eye cameras. The sceneResolutionScale property controls the rendering resolution, offering multisampling benefits at higher values. ```APIDOC File: Assets/SteamVR/Scripts/SteamVR_Camera.cs Description: Adds VR support to existing camera objects. Rendering: - Renders scenes at higher resolution off-screen for distortion correction. - Shares a single static render texture across each eye camera. Properties: SteamVR_Camera.sceneResolutionScale: Controls rendering resolution and multisampling. Compatibility Notes: - GUILayer and FlareLayer are not compatible (moved to SteamVR_GameView). - AudioListener is transferred to the 'head' object for proper spatialization. ``` -------------------------------- ### Configuring Per-Eye Culling Masks with SteamVR_Render Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Explains how to use the SteamVR_Render component, when manually added to a GameObject, to specify distinct culling masks for the left and right eyes, enabling per-eye rendering control. ```APIDOC SteamVR_Render Component: Description: A component that can be manually added to a GameObject to control per-eye rendering. Properties: leftCullingMask: LayerMask Description: The culling mask applied to the left eye's rendering. rightCullingMask: LayerMask Description: The culling mask applied to the right eye's rendering. Usage: 1. Create an empty GameObject in your scene. 2. Add the 'SteamVR_Render' component to this GameObject. 3. In the Inspector, set the 'Left Culling Mask' and 'Right Culling Mask' properties to control which layers are rendered for each eye. ``` -------------------------------- ### SteamVR API: RemoveAllListeners Method Fix (v2.8.0) Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt This fix in version 2.8.0 resolves an issue where the `RemoveAllListeners` method was not consistently removing all registered listeners, ensuring proper event cleanup and preventing memory leaks. ```APIDOC Method: RemoveAllListeners() Description: Fixes an issue where not all listeners were being removed. Impact: Ensures proper cleanup of event listeners. Availability: Fixed in SteamVR Unity Plugin v2.8.0. ``` -------------------------------- ### OnAxis Event for Axis Actions Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt An `onAxis` event has been introduced for `Single`, `Vector2`, and `Vector3` actions. This event triggers whenever the action's value is non-zero, allowing for continuous feedback and real-time processing of axis input, such as joystick movements or trigger pulls. ```APIDOC singleAction.onAxis += yourMethod; vector2Action.onAxis += yourMethod; vector3Action.onAxis += yourMethod; ``` -------------------------------- ### Retrieving Headset Activity Level in SteamVR Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Describes the `SteamVR.GetHeadsetActivityLevel()` method, which allows developers to query the current state of the HMD (Head-Mounted Display), indicating whether it is idle, in use, or other activity levels. ```APIDOC SteamVR.GetHeadsetActivityLevel() Returns: The current activity level of the HMD (e.g., idle, in use). ``` -------------------------------- ### Remove Deprecated SteamVR Status Components Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR_Status` and `SteamVR_StatusText` components have been removed. This change was necessary because they utilized `SteamVR_Utils.Event` with generic strings, a practice that is no longer supported. Developers should update their code to remove references to these components and find alternative methods for status display. ```APIDOC Removed: SteamVR_Status Removed: SteamVR_StatusText Reason: Deprecated usage of SteamVR_Utils.Event with generic strings. ``` -------------------------------- ### Control Skeletal Bone Data Updates Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The `SteamVR_Action_Skeleton.onlyUpdateSummaryData` property allows suppressing full skeletal bone data updates, opting instead for only summary data to improve performance. ```APIDOC SteamVR_Action_Skeleton.onlyUpdateSummaryData ``` -------------------------------- ### Renaming SteamVR Action Component Method Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt The method `GetDeviceComponentName()` on `SteamVR_Action_In` has been renamed to `GetRenderModelComponentName()`. This change provides a more accurate description of the method's purpose, which is to retrieve a non-localized string representing a render model's component, not necessarily a physical device component. ```APIDOC Old: SteamVR_Action_In.GetDeviceComponentName() New: SteamVR_Action_In.GetRenderModelComponentName() ``` -------------------------------- ### API Change: Resetting Seated Position in SteamVR Unity Plugin Source: https://github.com/valvesoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/readme.txt Documents the API change where the method for resetting the user's seated position was moved and renamed from `System.ResetSeatedPosition` to `Chaperone.ResetZeroPosition(trackingUniverse)` within the SteamVR Chaperone system. ```APIDOC Old API: System.ResetSeatedPosition New API: Chaperone.ResetZeroPosition(trackingUniverse) trackingUniverse: Specifies the tracking universe to reset the zero position for. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.