- SteamVR plugin plugin is used.
In the resource store, download the latest STEAMVR plug-in (https://kharma.unity3d.com/en/#!/content/32647) Import project.
Question 1
Failed to load Ivrrendermodels interface version ivrrendermodels_005
Current Workarounds
This issue is discussed in the Steam Official forum, please take a closer look. https://steamcommunity.com/app/358720/discussions/0/357286663674402763/
This directly encapsulates the support of the STEAMVR SDK.
is a required script. It provides all the features STEAMVR exposed. Do not advise you to do
Change this file. Should be synchronized with the associated OPENVR_API DLL.
- Assets/steamvr/scripts/steamvr.cs
initialization and shutdown of the system. access using Steamvr.instance . for any reason, NULL may be returned if the initialization fails.
To combat the stretching caused by distortion correction, render the scene at a higher resolution. because all cameras in unity are rendered sequentially, a static rendering texture is shared between each eye camera .
STEAMVR provides a specific render target size to mitigate distortion, However, rendering to a higher resolution in the relevant costs under provides additional multi-sampling benefits . This can be controlled by Steamvr_camera.sceneresolutionscale.
Note: Guilayer and Flarelayer are incompatible with Steamvr_camera because they are in screen space rather than in world space. Rendering .
these will automatically move the Steamvr_gameview object, and the object itself will automatically the parent ' head ' object added to the Steamvr_camera. The Audiolistener is also shifted to the head so that the audio is properly spatially formatted.
- Assets/steamvr/scripts/steamvr_overlay.cs-This component is used to assist in rendering 2D content in VR.
uses a special render path to synthesize the specified texture into a scene on a virtual surface to improve Fidelity.
- Assets/steamvr/scripts/steamvr_trackedobject.cs-Add it to any object that you want to use the trace.
the The HMD has a set to automatic. for the controller, select the index of the object you want to map to. in General, you should load these objects into the camera's "origin" object so that they are tracked in the same space. However, if it is inconvenient, you can specify "origin" in the Trackedobject itself.
- ASSETS/STEAMVR/script/Steamvr_rendermodel.cs-This component is used to render the model of the handle, and the position of the tracking handle .
Controller, primarily used to set up and detect VIVE controllers.
Vive controller consists of menu key (Applicationmenu), Touchpad (Touchpad), System Key/Power key (systems), trigger key (Trigger), Side handle key (Grip), composed
How to use:
Add 2 sub-objects to the Origin object to represent the 2 handles of Vive, and increase the Steamvr_trackedobject,index setting to None
Add Steamvr_controllermanager on Origin object, set left and right handles
Add a sub-object master camera as head on Origin, plus steam vr_tracked object
- Information about the Steamvr_controller controller
Information about the controller is included in the Steamvr_controller script. Note: Steamvr_controller is a non-monobehavior script that is not hanging in the scene and is running through the Steamvr_render script for a call to the update () function, which loops through the handles to get information about the handle.
The Steamvr_render script is automatically loaded into the scene when the program runs.
Buttonmask class: The name of each key of the handle.
Device class: The most important class that encapsulates all the information for a tracking device.
Update () function: Called by the Steamvr_render script, updates the information for each tracking device.
The Input () function: Initializes a device[] array based on index and instantiates all 16 device.
Detailed Steamvr_controller class content can refer to the blog: Unity SteamVR plugin detailed one: Steamvr_controller script Analysis +vive controller function development.
Unity3d SteamVR Plugin Study notes (1)