1
0

readme.txt 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  1. # SteamVR Unity Plugin - v2.7.2 (sdk 1.14.15)
  2. Copyright (c) Valve Corporation, All rights reserved.
  3. Requirements:
  4. The SteamVR runtime must be installed. This can be found in Steam under Tools.
  5. We strongly recommend you opt-in to the SteamVR Beta to make sure your application will work with future versions of SteamVR. Right-click SteamVR inside steam, click Properties, the beta tab, then select the beta branch.
  6. Documentation:
  7. Documentation can be found online here: https://valvesoftware.github.io/steamvr_unity_plugin/
  8. Quick Start:
  9. If you want to explore the interaction scene you'll need to open the SteamVR Input window (under the Window Menu), click yes to copy example jsons, then click Save and Generate to create input actions.
  10. For the most simple example of VR with tracked controllers see the sample scene at ​SteamVR/Simple Sample
  11. For a more extensive example including picking up, throwing objects, and animated hands see the Interaction System example at ​SteamVR/Interaction System/Samples/Interactions_Example
  12. Support:
  13. If you're having trouble with the plugin the best place to discuss issues is our github here: https://github.com/ValveSoftware/steamvr_unity_plugin/issues/
  14. If you'd like to discuss features, post guides, and give general feedback please post on the steam forum here: https://steamcommunity.com/app/250820/discussions/7/
  15. Input and Steam:
  16. If you publish your game to steam you can let users change their input bindings while the game is not running by setting the location of your action manifest. On the steamworks partner site go to the Application settings, and the Virtual Reality Section. At the bottom you'll see a radio button to designate your title as a SteamVR Input application. You then can set the location of your action manifest. In older versions of the plugin this was next to the executable. In versions 2.3.3 and above this is in [GameName]_Data/StreamingAssets/SteamVR/actions.json.
  17. Changes for 2.7.2
  18. * Refixed issue where Unity XR builds were failing
  19. Changes for 2.7.1
  20. * Fixed issue where builds were failing #879
  21. * Fixed skeleton poser crash bug #876
  22. * Fixed WebGL builds failing #869
  23. * Unity XR: Fixed issue with other platforms not building with the package installed. #33 #71
  24. * Unity XR: Fixed issue with unity editor crashing on init for some people. #52
  25. * Updated sdk header to 1.14.15
  26. * Moved OpenVR Unity XR package to a tarball included in this project instead of NPM per Unity's new TOS.
  27. * Removing app key from binding files on build (fixes some scenarios where an indev binding file wouldn't apply to a released app)
  28. * Retargeted some DLLs to not cause issues on other platforms
  29. * Fixed an issue with some builds where the settings file wouldn't copy over properly.
  30. * Removed some resolution dialog recommendations for 2019+
  31. * Reworked the auto-enable-vr systems to be easier to manage in the future and cause less problems in the present.
  32. * Added initialPriority to SteamVR_ActivateActionSetOnLoad. Thanks for the pull request @shiena
  33. * Fixed ControllerButtonHints for URP, Thanks again for the pull request @shiena
  34. * Added RemoveAllListeners to each action type for easy delegate disposal. Thanks for the pull request @Extrys
  35. * Unity XR: Fix for laptops not always using the correct video card
  36. * Unity XR: Fixing IL2CPP issue with builds
  37. * Unity XR: Enabled user presence detection via the userPresence feature.
  38. * Unity XR: Temporary fix for Unity XR Settings reverting to defaults when users hit play in the editor and have the window open.
  39. Changes for 2.6.1
  40. * Updated sdk header to 1.13.10
  41. * Added support for Unity XR API
  42. * Added basic Universal Rendering Pipeline support
  43. * Added Exclusion for unused build targets
  44. * Fixed some error logging messages related to the old VR API.
  45. * Fixing obsolete API issue in unity 2020.2a
  46. * Moved System.ResetSeatedPosition to Chaperone.ResetZeroPosition(trackingUniverse)
  47. * Fixed some errors / warnings in 2020.1+
  48. * Fixed HDRP error that would cause SteamVR to not start. (still no hdrp support for the interaction system)
  49. Changes for 2.5.0
  50. * Fixes the Open Binding UI button. This should now work on all computers as it opens the window in SteamVR instead of through your default browser.
  51. * Updated sdk header to 1.8.19
  52. * Multiple hands can now hover over one interactable.
  53. * Interactable now has a priority member. Higher numbers will make the interactable preferred when one hand is hovering over multiple interactables.
  54. * Fixed the SteamVR binding hint ui. This lets you show the user (through a SteamVR interface) what actions are mapped to what bindings in a specified set. See: SteamVR_Input.ShowBindingHints(Action), SteamVR_Input.ShowBindingHints(ActionSet), SteamVR_Input.ShowBindingHints(ActionSet), SteamVR_Input.ShowBindingHintsForActiveActionSets()
  55. Changes for 2.4.5
  56. * Fixed the path for the editor manifest
  57. * Fixed the openvr_api.cs version (1.7.15)
  58. Changes for 2.4.3
  59. * **BREAKING** actions.json and associated bindings will automatically be moved to the StreamingAssets folder instead of stored in the project root. This removes the need for the plugin to copy them post build and fixes some problems people were having with version control. **IF YOU HAVE A TITLE ON STEAM AND YOU USE THIS TO BUILD - SET THE NEW PATH IN Application/Virtual Reality -> SteamVR Input System -> This game uses SteamVR Input system to: [GameName]_Data/StreamingAssets/SteamVR/actions.json **
  60. * Added properties to SteamVR_Settings to set default models to use when previewing hand poses
  61. * Moved default location of SteamVR_Settings.asset to a folder called SteamVR_Resources to make upgrading the plugin easier (can just delete the whole steamvr directory and import again)
  62. * Various fixes for mac/linux issues
  63. * Pathing fixes to allow nesting of the SteamVR folders
  64. * Added a way to easily set the prefab the poser system uses for previews in the editor. Check SteamVR_Settings.asset
  65. * Some fixes for fallback mode
  66. * Added index hmd proximity binding
  67. * Increased default ColliderArraySize for Hands in the Interaction System to 32
  68. * Removed ResolutionDialogSetting warning in Unity 2019.1 (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/498)
  69. * Fix partial bindings not including default actions (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/494)
  70. * Fix Unity crash on "Open binding UI" when using as package (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/491)
  71. * Fix for copy example input files failing on Linux/OSX (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/490)
  72. * Add Treadmill Source to Input Sources (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/486)
  73. * 2D Debug: Camera navigation up/down (E/Q) support (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/481)
  74. * Fixed an issue with Unity throwing "cannot find ın" error in PCs with Turkish default language. (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/479)
  75. * Exposed useItemPackagePreview (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/432)
  76. * Modified Throwable to optionally ease into release velocity scaling. (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/173)
  77. * Updated openvr sdk version to 1.7.15
  78. * Significant performance increases in the input system
  79. * Made the hands physical objects that can touch and push things (similar to The Lab)
  80. * Added Snap Turn and related actions / bindings
  81. * Changed teleport bindings to use joysticks when available
  82. * Normalized line endings and trailing spaces across project
  83. * Added Vive Cosmos default bindings
  84. * Removed the requirements to have a velocityestimator on throwables.
  85. * Added SteamVR.GetHeadsetActivityLevel() which will give you the current state of the hmd (idle, in use, etc)
  86. Changes for 2.3.2
  87. * Updated openvr sdk version to 1.4.18
  88. * Added SteamVR.asmdef.20192 for Unity 2019.2b and 2019.3a - replace SteamVR.asmdef to fix UI errors in these versions.
  89. Changes for 2.3.1b
  90. * Added legacy mixed reality camera mode (enabled by default). You can change this in SteamVR/Resources/SteamVR_Settings.
  91. * Fixing some errors for 2019.1
  92. * Removing an unused editor class
  93. * Added low fidelity fallback hand animation for when no skeleton data is available (WinMR)
  94. * Fixing OpenVR Package not required error for pre 2018.2 versions of unity
  95. * Fixed serializable event in Throwable
  96. * Fix for Custom Skeleton not getting initialized
  97. * Fix for a rare failure in action retrieval (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/431)
  98. * Allowing folders in the action path. (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/443)
  99. * Fix for multiple SteamVR_Behaviours initializing (https://github.com/ValveSoftware/steamvr_unity_plugin/pull/435)
  100. * Stop updating poses if they're not active
  101. Changes for 2.3b
  102. * Fix for runtime action instantiation generating garbage
  103. * Fix for setting Universe Origin at runtime. SteamVR.settings.trackingOrigin will automatically set all pose origins and the compositor origin (hmd)
  104. * Physics objects correctly teleport while held now
  105. * Fix for left hand being inside out sometimes.
  106. * Fixed some perf and gc issues in the skeleton
  107. * Updated poses to support 120hz prediction better
  108. * Fix for IL2CPP compilation
  109. * Fix for poor interpolation when dropping objects with left hand
  110. * Added SteamVR_TrackingReferenceManager to allow showing tracking devices (base stations / cameras)
  111. * Typo fix for GetStateUp returning GetStateDown
  112. * Added ability to suppress updating the full skeletal bone data and only update summary data SteamVR_Action_Skeleton.onlyUpdateSummaryData
  113. * Added access to different skeletal summary data. SteamVR_Action_Skeleton.summaryDataType specifies if you want the summary of the animation data or the summary of the device data. Device data may be faster but different than animation data.
  114. * Added wrappers for ShowActionOrigin and ShowBindingsForActionSet. See SteamVR_Action.ShowOrigins() .HideOrigins(). SteamVR_ActionSet.ShowBindingHints() .HideBindingHints()
  115. Changes for v2.2.0:
  116. * Removing some unused code
  117. Changes for v2.2RC5:
  118. * Fix for controllers that don't support Skeleton Input yet (WinMR)
  119. * Fixing issue where sometimes SteamVR would load legacy bindings for SteamVR Input projects while in the editor.
  120. Changes for v2.2RC4:
  121. * Changed SteamVR_Input.isStartupFrame to return true for the couple frames around startup. This fixes some startup errors temporarily until we have a SteamVR API to determine startup state.
  122. * Fixed an issue where builds would fail
  123. * Significantly reduced asset package file size (~50%). Some psds were replaced with pngs, some png res was lowered. The old assets are still on the github repo under old plugin versions.
  124. * Made Unity 2018.1+ OpenVR package detection and installation more robust.
  125. * Improved Project Setup experience when using an Oculus headset
  126. Changes for v2.2RC3:
  127. * Minor Breaking Change: SteamVR_Behaviour_ActionType events were incorrectly sending the action instead of the behaviour component they came from.
  128. * Minor Breaking Change: Simplified the handFollowTransform member to be one variable instead of three
  129. * Fixed code generation so it deletes unused actionset classes (asks first)
  130. * Fixed behaviour events disappearing from serialized objects in some unity versions
  131. * Added a few events to SteamVR_Behaviour_Skeleton
  132. * Added C# style events to the SteamVR_Behaviour_ActionType components.
  133. * Added Happy Ball as an example of a complex blending pose that moves the held object
  134. * Added scaling support for the skeleton poser
  135. * Cleaned up the canvas elements on the Interaction System Sample scene.
  136. * Skeleton poser is now able to snap/follow interactables
  137. * Fixed the namespace on a couple small sample scene components
  138. * When clicking the "Show binding UI" button we will now always try to launch the default browser, though it may fail sometimes (Edge) we have better error messages now
  139. * Fixed some documentation errors
  140. * Improved skeleton poser editor ui
  141. * Fixed an issue with ActionSets not serializing defaults properly
  142. Changes for v2.2RC2:
  143. * Interactable.isHovering now correctly reports hovering when a hand is over it. There is a new associated field Interactable.hoveringHand.
  144. * RenderModels should no longer throw an error on immediate reload.
  145. * Added the SteamVR_Behaviour component to the Player prefab in the Interaction System so it's easier to set it's DoNotDestroy value.
  146. * Fixed an issue with skeletons complaining that they were getting called too early. Initial action updates now happen a frame after SteamVR_Input initialization.
  147. * Normalized the behaviours of the throwables in the Interaction System sample scene to do what their description says they should.
  148. * Fixed an issue with TeleportArea throwing errors without a Teleport component in the scene.
  149. Changes for v2.2RC1:
  150. * Feature: Added SteamVR_Skeleton_Poser component that simplifies creating poses that are easily compatible with the SteamVR Skeletal System. Check the objects in the Interaction System scene for examples or add the component to an interactable. More documentation on this feature will come before release. Example poses will be improved before release.
  151. * Copied skeletalTrackingLevel, arrays, and finger splays into the Skeleton Behaviour component
  152. * Fixed some related skeleton docs
  153. * Added an option to importing partial bindings to just replace the current actions instead of merging.
  154. Changes for v2.2b5:
  155. * Fixed an issue where the SteamVR_Actions assembly was not being auto referenced by the main assembly. (intellisense would not recognize the class)
  156. * Fixed an issue with nullchecks against unassigned actions returning false incorrectly. (headsetOnHead == null with no action assigned should return true)
  157. Changes for v2.2b4:
  158. * Fixed an issue in builds where actions and action sets were not deserializing correctly.
  159. * Added an option to turn on the action set debug text generation for builds in the manager.
  160. * Fixed an issue where automatic SteamVR Input calls on frame 0 would cause errors.
  161. Changes for v2.2b3:
  162. * Fixed a named action property generation issue
  163. * Fixed an issue with not removing missing default binding files from the action manifest
  164. Changes for v2.2b2:
  165. * Fixed an assembly definition issue during generation.
  166. * Added a warning to Edge users that they need to manually open the binding ui.
  167. Changes for v2.2:
  168. * Major Breaking Change: To allow for the new SteamVR plugin to use assembly definition files generated action properties have been moved to the SteamVR_Actions class. Since this was already breaking references to actions we've also created friendlier names. SteamVR_Input.__actions_default_in_GripGrab -> SteamVR_Actions.default_GripGrab
  169. * Breaking Change: SteamVR_Action_In.GetDeviceComponentName() has been renamed GetRenderModelComponentName because that is more descriptive. This is a non-localized string representing the render model's component. Not necessarily the physical component on the device.
  170. * Major Change: Added Indexer/property style action data access. Instead of booleanAction.GetStateDown(SteamVR_Input_Sources.LeftHand); you can now use booleanAction[SteamVR_Input_Sources.LeftHand].stateDown; Or if you don't need to restrict to a specific input source just access booleanAction.stateDown;
  171. * Fix for Mixed Reality camera configs. The Example actions now have a "mixedreality" action set with an "ExternalCamera" pose action. Set this pose to a tracker / controller and mixed reality should work again. By default the camera tracker type is bound to this action. You can also change the pose that's used in SteamVR/Resources/ExternalCamera.
  172. * When saving / generating actions the plugin will now automatically remove entries in default binding files for actions that no longer exist.
  173. * Auto loading OpenVR package for projects that don't have it (2018.1+)
  174. * Only updating actions that has been accessed.
  175. * Fixed issue where you would get old data from an action recently activated.
  176. * Fixed some issues with Unity 2018.3+
  177. * Significant XML style documentation added in preparation for documentation generation
  178. * Added C# events with autocomplete to all actions. booleanAction[source].onStateDown += yourMethod will auto-generate a method with named variables!
  179. * Added C# events to all SteamVR_Behaviour_ActionType components
  180. * Added unrestricted input source shortcuts to actions. booleanAction.state is a short-cut to booleanAction[SteamVR_Input_Sources.Any].state.
  181. * Faster initialization.
  182. * Fixed some issues with actions not serializing properly.
  183. * Added DoNotDestroy checkbox to SteamVR_Behaviour component.
  184. * Active has been split into Active and ActiveBinding - ActiveBinding indicates the action has an active binding, Active indicates the binding is active as well as the containing action set.
  185. * Calls to action data will now only return valid data then the action is active. So actionBoolean.stateDown will always be false if the action is inactive.
  186. * Added delta parameter to Single, Vector2, Vector3 behaviour events
  187. * Added onState event to Boolean actions that fires when the action is true
  188. * Added onAxis event to Single, Vector2, and Vector3 actions that fires when the action is non-zero.
  189. * General input system performance increases
  190. Changes for v2.1.5:
  191. * Breaking Change: Skeleton actions no longer take a input source as a parameter since this doesn't make sense. A lot of skeleton action method signatures have changed
  192. * Added lots of new helpful functions to the skeleton behaviour and action classes. Finger curl, finger splay, reference poses, tracking level, bone names, etc.
  193. * Added SteamVR_Input.GetLocalizedName and SteamVR_Action_In.GetLocalizedName that will return the localized name of the device component to last use that action. "Left Hand Vive Controller Trackpad". You can specify which parts of the name you want as well.
  194. * Fixed a major slowdown with going in and out of the steamvr dashboard at runtime
  195. Changes for v2.1:
  196. * Major Breaking Change: Actions and ActionSets are no longer Scriptable Objects. Make sure to delete your existing SteamVR_Input folder with all your generated stuff in it. This means you will have to reset all Actions and Action Sets in all prefabs and scenes.
  197. * Breaking Change: DefaultAction and DefaultActionSet properties no longer exist. Good news: Generation is now near-instant, doesn't require looping through every prefab and every scene. Set defaults through the following format: public SteamVR_Action_Pose poseAction = SteamVR_Input.GetAction<SteamVR_Action_Pose>("Pose"); or public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.__actions_default_in_InteractUI;
  198. * Breaking Change: actionSet.inActions and actionSet.outActions are no longer generated. We're moving all the actions directly to the set level. Previously: SteamVR_Input._default.inActions.GripGrab. Now: SteamVR_Input._default.GripGrab. Collisions of an In-Action with the same name as an Out-Action will be handled by prepending "in_" and "out_" to the field names.
  199. * Breaking Change: More extensive action set management. Swapped out ActivatePrimary and ActivateSecondary for a single Activate call. You can activate as many sets at once as you want.
  200. * Added ability to create partial input bindings to be used in plugins. Create a partial binding folder and include it in your plugin. When users import your plugin they will be presented with the option to import your actions and bindings.
  201. * Added better tracker support via access to other user paths. Poses can now be bound to user/foot/left, user/foot/right, etc.
  202. * Added access to action set priorities. If you activate an action set with a higher priority it will stop actions bound to the same button in lower priority sets from updating
  203. * Added action set visualization to live editor window
  204. * Added more extensive string access to actions. SteamVR_Input.GetAction(actionName), GetState(actionName, inputSource), GetFloat(actionName, inputSource), GetVector2(actionName, inputSource)
  205. * Added proximity sensor action and example. The interaction system will log when you put the headset on / take it off. (binding ui for this still needs fix)
  206. * Fixed some generation and loading issues with 2018.3
  207. * Bolded [SteamVR] in Debug.log entries
  208. * Fixed a rigidbody issue with 2018.3
  209. * Fixed some issues with delayed loading SteamVR. Added a test scene: SteamVR/Extras/SteamVR_ForceSteamVRMode.unity
  210. * Readded the laser pointer extra with an example scene: SteamVR/Extras/SteamVR_LaserPointer.unity
  211. * Fixed auto-enabling of vr mode in recent unity versions. (Reminder you can disable this in: Edit Menu -> Preferences -> SteamVR)
  212. * Fixed action set renaming so it renames all actions in its set. Does not currently modify default bindings though.
  213. * Fixed basic fallback hand support
  214. * Moved automatic enabling of VR in player settings to the SteamVR_Settings.asset file in SteamVR/Resources. This allows better per project settings
  215. * Gave better error when SteamVR fails to initialize with oculus devices
  216. Changes for v2.0.1:
  217. * Changed SteamVR to identify only when in editor. SteamVR_Setting.appKey has been replaced with SteamVR_Setting.editorAppKey. This means that downloads from steam will always use proper bindings but builds run separate from Steam will have their own autogenerated app key. Remember to replace your default bindings in the binding ui before creating a build.
  218. * Fixed bug where hands were not reactivating properly after visiting the dashboard (https://github.com/ValveSoftware/steamvr_unity_plugin/issues/118)
  219. * Fixed bug with multiple items being grabbed at once (https://github.com/ValveSoftware/steamvr_unity_plugin/issues/121)
  220. * Fixed bug where Linear Drive would freeze when grabbed twice (https://github.com/ValveSoftware/steamvr_unity_plugin/issues/120)
  221. * Fixed bug with bindings that were readonly not copying correctly.
  222. * Fixed some other bugs with multiple pickup types being activated at once.
  223. Changes for v2.0:
  224. * Updated to SteamVR runtime v1537309452 and SDK version 1.0.16.
  225. * Removed support for older versions of Unity (v5.4 or newer required). Previous versions of the plugin can be found here: https://github.com/ValveSoftware/steamvr_unity_plugin/
  226. Changes for v2.0rc4:
  227. * Support for Windows MR (no Skeletal input at this time - driver needs to be updated)
  228. * Added SteamVR_ActionIn.onActiveChange event (most actions inherit from this class)
  229. * Added Interactable.activateActionSetOnAttach to activate action sets when you grab an item and deactivate them when they're detached
  230. * Fixed an issue in the SteamVR Input Live View that made it unreadable
  231. * Fixed an issue that lead to duplicate SteamVR_Render components in some circumstances
  232. * Removed Debug UI from release builds using the Interaction System
  233. * Added ModalThrowable. Allowing different snap locations for grip and pinch pickups
  234. * Added grenade as an example of the ModalThrowable
  235. * Added a squishable object for a knuckles force example
  236. * Fixed an order of operations error where the interactable detach event was being called after the attach event when an item changed hands
  237. * Fixed an issue with pickup points being in odd places
  238. * Forcing hover unlock on interactable destruction
  239. * Added support for Unity 2018.3
  240. * Fixed an issue with delayed init
  241. Changes for v2.0rc3:
  242. * Added some pdf documentation for the new plugin and input system
  243. * Added code documentation to most public functions in the input system
  244. * Removed SteamVR_Camera from prefabs as this is no longer necessary
  245. * Added simple rc car example ported from Knuckles Tech Demo
  246. * Added simple platformer example
  247. * Switched hover highlights to highlight the object being interacted with instead of the controller. Can be reenabled in the player prefab.
  248. * Fixed some upgrading issues for Unity 2018
  249. * Added glcore to a few of the shaders to make them opengl compatible
  250. * Fixed a code generation issue that was generating static members instead of instance members, making actions inside sets unavailable.
  251. * Added scrollview to LiveWindow
  252. * Fixed some issues with action sets
  253. * Added DefaultActionSet attribute to specify a default action set to be assigned to fields/properties on input generation
  254. * Updated some scriptable object fields to not serialize things unintentionally
  255. * Made initialization a little more streamlined.
  256. * Added an event you can subscribe to for when initialization is completed (SteamVR_Events.Initialized(bool)). The bool indicates success
  257. * Improved editor UI for action / action set assignment
  258. * Made the example button do something on press
  259. Changes for v2.0rc2:
  260. * Added built in support for delayed loading of SteamVR. You can now call SteamVR.Initialize() and pass a boolean to force set unity to OpenVR mode.
  261. * Added a new Simple Sample scene in the root to do super basic testing.
  262. * Moved SteamVR Input updating to SteamVR_Behaviour which also handles the SteamVR_Render component. This will be added to scenes at runtime.
  263. * Added ability to explicitly show or hide controller model in the interaction system
  264. * Gave the interaction system scene a new paint job
  265. * Auto scaling the teleporter beam to the player size
  266. * Added a new quickstart pdf
  267. * Fixed issue for Unity 5.6 not showing controllers
  268. * Fixed issue for 2018.2 not opening the input window properly
  269. * Minor performance increases
  270. * Updated initialization process to support having XR set to none or Oculus initially.
  271. * Moved some of example jsons files into a more reasonable directory.
  272. Changes for v2.0rc1:
  273. * Namespacing all SteamVR scripts. This will be a breaking change for most projects but this is a major revision.
  274. * Renamed most of the input classes to have a more reasonable length. Generally removed _Input_ as it's redundant in most places
  275. * Fixed some issues with newer versions of Unity throwing errors during action generation
  276. * Fixed some issues with scenes not opening properly during generation on newer versions of Unity
  277. * Removing SteamVR_Settings from plugin, it should be auto generated so new versions of the plugin don't overwrite it
  278. * Fixed some performance issues surrounding using the legacy input system at the same time as the new input system. This is not a supported scenario.
  279. * Minor performance increases around render model loading.
  280. * Removed some legacy system scripts
  281. * Fixed the button hint system
  282. * Consolidated the skeleton options
  283. Changes for v1.3b10:
  284. * Fixed a couple issues that would cause tracking jitter or entire loss of input
  285. * Fixed an issue with destroying held objects
  286. Changes for v1.3b09:
  287. * Newly created action sets default to "single" mode allowing action mirroring in the binding UI.
  288. * Added an example of blending unity animations with the skeleton input system. The sphere on the Equippable table can be grabbed and the hand will blend to an animation.
  289. * Interactables now hand a hideHandOnAttach bool, a handAnimationOnPickup int that triggers an Animator.SetInt, and setRangeOfMotionOnPickup which will temporarily set the range of motion while an object is attached.
  290. * Added a tool example for "With Controller" hand animation examples. Equippables can also be flipped depending on the hand that picks them up.
  291. * Interactables now can tell hands to snap to them on attach. Specify a transform to snap to in Interactable.handFollowTransform and then check handFollowTransformPosition and/or handFollowTransformRotation
  292. * Added Range of Motion blending to skeleton - Hand.SetSkeletonRangeOfMotion(rangeOfMotion, blendTime)
  293. * Updated skeleton system to account for coordinate system changes
  294. * Fixed some perf issues with the old render models (WIP)
  295. * Fixed some bugs with button hints (WIP)
  296. * Interactables should now auto detach on destroy.
  297. * Added slim glove models, an example of an alien hand with 3 fingers, and an alien hand with floppy fingers
  298. * Hands now initialize a RenderModel object which can contain a hand and a controller. These can be toggled on and off separately
  299. * Fixed issue with controller highlighters not initializing correctly
  300. * Added the ability to attach an object to a specific offset from the Hand - Hand.ObjectAttachmentPoint
  301. * Fixed issue where render model would not show after bringing up compositor
  302. * Fixed issue with default Throwables. HoverButton now works in local space
  303. * Fixed issue with velocities and angular velocities not transforming properly
  304. Changes for v1.3b08:
  305. * SteamVR_Input_References has been moved to the generated folder so new plugin updates don't wipe yours. Prior beta users: Please delete your existing one in Assets/SteamVR/Resources/SteamVR_Input_References.asset
  306. * SteamVR_Input is no longer a MonoBehaviour. This fixes scene transition issues as well as event subscription issues.
  307. * The Live Action View has been moved to its own window under the Window menu.
  308. * Some excess configuration options were removed from the settings window, some were moved into SteamVR_Settings if still needed.
  309. * Added a Hover Button that depresses when the controller gets close to it.
  310. * Fixed an issue where default throwables would "auto catch" objects
  311. Changes for v1.3b07:
  312. * Fixed issue with upgrading from the legacy system
  313. * Fixed some line endings
  314. * Fixed generation bug where it wouldn't reopen to the scene you started on
  315. * Auto replacing app key in binding files
  316. * Updating actions and bindings to have one pose and one haptic action
  317. * Gave each app its own app id via a vrmanifest that is generated on import. Can be modified in SteamVR_Settings for release.
  318. * Fixed haptic actions not displaying in play mode
  319. * Temporary fix for skeletons erroring while the dashboard is up
  320. Changes for v1.3b06:
  321. * Added some flower and planting stuff for the tutorial
  322. * Updating knuckles actions and binding jsons
  323. * Added code solution for blending skeleton animations to mechanim, no example yet though
  324. * Updated some helper components to utilize Unity Events properly
  325. * Updated skeleton hierarchy
  326. Changes for v1.3b05:
  327. * Added a knuckles binding for the Grab mode
  328. * Fixed some bugs around skeleton updates and GC alloc
  329. * Fixed a pretty significant perf hit
  330. * Added a blending option to skeletons
  331. * Added some ui to try out skeleton options
  332. * Added a target for the throwing examples
  333. * Updated longbow to only fire arrows with the pinch action
  334. * Updated other interactable examples
  335. * Added some helper methods to hand around showing / hiding controller or the whole hand.
  336. * Fixed some of the throwing examples
  337. Changes for v1.3b04:
  338. * Added some more extensive velocity and angular velocity estimation based on positions and rotations per frame. Normalizing for time between frames.
  339. * Cleaned out and updated the actions + bindings for knuckles/wands/touch.
  340. * Fixed a bug with newly created actions not having a set type
  341. * Updated extra scenes to use the new input system
  342. Changes for v1.3b03:
  343. * Fixed some warnings for unity 2017 / 2018.
  344. * Fixed some editor UI issues for 2018
  345. * Fixed issues with Unity 2017+ not wanting to open scenes from a script reloaded callback
  346. Changes for v1.3b02:
  347. * Added DefaultInputAction attribute to automatically assign actions during action generation.
  348. * Updated default CameraRig prefab to use the new input system and components
  349. Changes for v1.3b01:
  350. * Integrated SteamVR Input System.
  351. https://steamcommunity.com/games/250820/announcements/detail/3809361199426010680
  352. * [InteractionSystem] Added basic examples of the Skeletal API
  353. * [InteractionSystem] Integrated SteamVR Input System. Actions and Action Sets instead of buttons.
  354. * [InteractionSystem] Added Velocity style object interaction
  355. * [InteractionSystem] Fixed some issues from github. Took some pull requests.
  356. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/79
  357. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/73
  358. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/72
  359. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/71
  360. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/67
  361. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/64
  362. https://github.com/ValveSoftware/steamvr_unity_plugin/issues/84
  363. https://github.com/ValveSoftware/steamvr_unity_plugin/issues/78
  364. Changes for v1.2.3:
  365. * Updated to SteamVR runtime v1515522829 and SDK version 1.0.12.
  366. * Updated quickstart guide.
  367. * [General] Fixed deprecation warnings for GUILayer in Unity version 2017.2 and newer (removed associated functionality).
  368. * [LoadLevel] Fixed a crash when using SteamVR_LoadLevel to load a scene which has no cameras in it.
  369. * [RenderModels] Switched from using TextureFormat.ARGB32 to RGBA32 to fix pink texture issue on Vulkan.
  370. * [RenderModels] Fix for not initializing properly if game is paused on startup.
  371. https://github.com/ValveSoftware/steamvr_unity_plugin/issues/62
  372. * [InteractionSystem] Added implemention for ItemPackageSpawner requireTriggerPressToReturn.
  373. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/17/files
  374. Changes for v1.2.2:
  375. * Updated to SteamVR runtime v1497390325 and SDK version 1.0.8.
  376. * [General] Switched caching SteamVR_Events.Actions from Awake to constructors to fix hot-loading of scripts in the Editor.
  377. * [General] Switched remaining coroutines away from using strings (to avoid issues with obfuscators).
  378. * [General] Switched from using deprecated Transform.FindChild to Transform.Find.
  379. * [General] Added #if !UNITY_METRO where required to allow compiling for UWP.
  380. * [UpdatePoses] Switched to using static delegates (Camera.onPreCull or Application.onBeforeRender depending on version) for updating poses.
  381. * [UpdatePoses] Deprecated SteamVR_UpdatePoses component.
  382. * [MixedReality] Added rgba settings to externalcamera.cfg for overriding foreground chroma key (default 0,0,0,0).
  383. * [MixedReality] Exposed SteamVR_ExternalCamera.Config settings in Unity Editor inspector for easy tweaking.
  384. * [MixedReality] Added file watcher to externalcamera.cfg to allow real-time editing.
  385. * [MixedReality] Fixed antialiasing complaint in Unity 5.6+.
  386. * [MixedReality] Added second pass to foreground camera when using PostProcessingBehaviour since those fx screw up the alpha channel.
  387. * [ControllerManager] Added code to protect against double-hiding of controllers.
  388. * [InteractionSystem] Sub-objects now inherit layer and tag of spawning object (ControllerButtonHints, ControllerHoverHighlight, Hand, SpawnRenderModel).
  389. Changes for v1.2.1:
  390. * Updated to SteamVR runtime v1485823399 and SDK version 1.0.6.
  391. * Switched SteamVR_Events.SystemAction from using strings to specify event type over to their associated enum values.
  392. * Fixed an issue with using WWW in static constructors.
  393. * Added Unity Preferences for SteamVR to allow disabling automatic enabling of native OpenVR support in Unity 5.4 or newer.
  394. https://github.com/ValveSoftware/steamvr_unity_plugin/issues/8
  395. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/9
  396. * Added UNITY_SHADER_NO_UPGRADE to all shaders to avoid log spam in later versions of Unity for issues that have already been fixed but the compiler isn't able to detect.
  397. * Specified Vulkan support for Interaction System shaders.
  398. * Fix for crash in Interaction_Example selecting BowPickup:
  399. https://github.com/ValveSoftware/steamvr_unity_plugin/issues/4
  400. * Cleaned up unused fields:
  401. https://github.com/ValveSoftware/steamvr_unity_plugin/issues/2
  402. * Updated Interaction System's LinearDrive to initialize using linearMapping.value.
  403. https://github.com/ValveSoftware/steamvr_unity_plugin/pull/5
  404. * Updated Interaction System documetation to fix a few errors.
  405. * Added an icon for all Interaction System scripts.
  406. * Fixes for SteamVR on Linux.
  407. Changes for v1.2.0:
  408. * Updated to SteamVR runtime v1481926580 and SDK version 1.0.5.
  409. * Replaced SteamVR_Utils.Event with SteamVR_Events.<EventName> to avoid runtime memory allocation associated with use of params object[] args.
  410. * Added SteamVR_Events.<EventName>Action to make it easy to wrap callbacks to avoid memory allocation when components are frequently enabled/disabled at runtime.
  411. * Fixed other miscellaneous runtime memory allocation in SteamVR_Render and SteamVR_RenderModels. (Suggestions by unity3d user @8bitgoose.)
  412. * Integrated fix for SteamVR_LaserPointer direction (from github user @fredsa).
  413. * Integrated fixes and comments for SteamVR_Teleporter (from github user @natewinck).
  414. * Removed SteamVR_Status and SteamVR_StatusText as they were using SteamVR_Utils.Event with generic strings which is no longer allowed.
  415. * Added SteamVR_Controller.assignAllBeforeIdentified (to allow controller to be assigned before identified as left vs right). Suggested by github user @chrwoizi.
  416. * Added SteamVR_Controller.UpdateTargets public interface. This allows spawning the component at runtime. Suggested by github user @demonixis.
  417. * Fixed bug with SteamVR_TrackedObject when specifying origin. Suggested by github user @fredsa.
  418. * Fixed issue with head camera reference in SteamVR_Camera. Suggested by github user @pedrofe.
  419. Known issues:
  420. * The current beta version of Unity 5.6 breaks the normal operation of the SteamVR_UpdatePoses component (required for tracked controllers).
  421. To work around this in the meantime, you will need to manually add the SteamVR_UpdatePoses component to your main camera.
  422. Changes for v1.1.1:
  423. * Updated to SteamVR runtime v1467410709 and SDK version 1.0.2.
  424. * Updated Copyright notice.
  425. * Added SteamVR_TrackedCamera for accessing tracked camera video stream and poses.
  426. * Added SteamVR_TestTrackedCamera scene and associated script to demonstrate how to use SteamVR_TrackedCamera.
  427. * Fix for SteamVR_Fade shader to account for changes in Unity 5.4.
  428. * SteamVR_GameView will now use the compositor's mirror texture to render the companion window (pre-Unity 5.4 only).
  429. * Renamed SteamVR_LoadLevel 'externalApp' to 'internalProcess' to reflect actual functionality.
  430. * Fixed issue with SteamVR_PlayArea material loading due to changes in Unity 5.4.
  431. * Added Screenshot support handling for stereo panoramas generation.
  432. * Removed code that was setting Time.maximumDeltaTime as this was causing issues.
  433. Changes for v1.1.0:
  434. * Fix for error building standalone in SteamVR_LoadLevel.
  435. * Set SteamVR_TrackedObject.isValid to false when disabled.
  436. Changes for v1.0.9:
  437. * Updated to SteamVR runtime v1461626459 and SDK version 0.9.20.
  438. * Updated workshop texture used in sea of cubes example level to use web page from SteamVR (was previously from Portal).
  439. * Updated various SDK changes to Unity in 5.4 betas.
  440. * Added controllerModeState to RenderModel component to control additional features like scrollwheel visibility.
  441. * RenderModels now respond to model skin changes.
  442. * Removed OnGUI and associated help text (i.e. "You may now put on your headset." notification) as this was causing unnecessary overhead.
  443. * Fix to SteamVR_Render not turning back on if all cameras were disabled and then re-enabled.
  444. * Hooked up SteamVR_Render.pauseRendering in Unity 5.4 native OpenVR integration.
  445. * Fix for input_focus event sometimes getting sent inappropriately.
  446. * Fix for timeScale handling.
  447. * Fix for SteamVR_PlayArea not finding its material in editor in Unity 5.4 due to changes in how Unity handles asset loading.
  448. * Miscellaneous fixes to reduce hitching when using SteamVR_LoadLevel to handle scene transitions.
  449. * Hooked up SteamVR_Camera.sceneResolutionScale to Unity 5.4's native vr integration render target scaling.
  450. * Forced SteamVR initialization check in SteamVR_Camera.enable (and bail upon failure) in Unity 5.4 (was already doing this in older builds).
  451. * Better handling of SteamVR_Ears component with old content.
  452. * Keep legacy head object around in case external components were referencing it (was previously getting deleted in Unity 5.4 as the head motion is now applied to the "eyes" object).
  453. * Miscellaneous fixes for SteamVR_TrackedController and SteamVR_Teleporter.
  454. * Fixed up Extra scenes SteamVR_TestThrow and SteamVR_TestIK.
  455. * Added stereo panorama screenshot support to SteamVR_Skybox.
  456. * Removed use of deprecated UnityEditorInternal.VR.VREditor.InitializeVRPlayerSettingsForBuildTarget(BuildTargetGroup.Standalone);
  457. Changes for v1.0.8:
  458. * Updated to SteamVR runtime v1457155403.
  459. * Updated to work with native OpenVR integration introduced in Unity 5.4. In this and newer versions, openvr_api.dll will be automatically deleted when launching since it ships as part of Unity now.
  460. * C# interop now exports arrays as individual elements to avoid the associated memory allocation overhead passing data back and forth between native and managed code.
  461. * Applications should no longer call GetGenericInterface directly, but instead use the accessors provided by Valve.VR.OpenVR (e.g. OpenVR.System for the IVRSystem interface).
  462. * Added SteamVR_ExternalCamera for filming mixed reality videos. Automatically enabled when externalcamera.cfg is added to the root of your projects (next to Assets or executable), and toggled by the presence of a third controller.
  463. * Render models updated to load asynchronously. Sends "render_model_loaded" event when finished.
  464. * Added 'shader' property to render models to allow using alternate shaders. This also creates a dependency within the scene to ensure the shader is loaded in baked builds.
  465. * Fix for render model components not respecting render model scale.
  466. * SteamVR_Render.lockPhysicsUpdateRateToRenderFrequency now respects Time.timeScale.
  467. * SteamVR_LoadLevel now hides overlays when finished to avoid persisting performance degredation.
  468. * Added ability to launch external applications via SteamVR_LoadLevel.
  469. * Added option to load levels non-asynchronously in SteamVR_LoadLevel since Unity crashes on some content when using asyn loading.
  470. * SteamVR auto-disabled if initialization fails, to avoid continual retries.
  471. * Updated SteamVR_ControllerManager to get controller indices from the runtime (via IVRSystem.GetTrackedDeviceIndexForControllerRole).
  472. * SteamVR_ControllerManager now allows you to assign additional controllers to game objects.
  473. * [CameraRig] prefab now listens for a third controller connection which will enable mixed reality recording mode in the game view.
  474. * AudioListener is now transferred to a child of the eye camera called "ears" to allow controlling rotation independently when using speakers instead of headphones.
  475. * Flare Layer is no longer transferred from eye camera to game view camera.
  476. Changes for v1.0.7:
  477. * Updated to SteamVR runtime v1448479831.
  478. * Many enums updated to reflect latest SDK cleanup (v0.9.12).
  479. * Various fixes to support color space changes in the SDK.
  480. * Render models set the layer on their child components now to match their own.
  481. * Added a bool 'Load Additive' to SteamVR_LoadLevel script to optionally load the level additively, as well as an optional 'Post Load Settle Time'.
  482. * Fixed some issues with SteamVR_LoadLevel fading to a color with 'Show Grid' set to false.
  483. * Fixed an issue with orienting the loading screen in the SteamVR_LoadLevel script when using 'Loading Screen Distance'.
  484. Changes for v1.0.6:
  485. * Updated to SteamVR runtime v1446847085.
  486. * Added SteamVR_LevelLoad script to help smooth level transitions.
  487. * Added 'Take Snapshot' button to SteamVR_Skybox to automate creation of cubemap assets.
  488. * SteamVR_RenderModel now optionally creates subcomponents for buttons, etc. and optionally updates them dynamically to reflect pulling trigger, etc.
  489. * Added SteamVR_TestIK scene to Extras.
  490. * Added SteamVR.enabled which can be set to false to keep SteamVR.instance from initializing SteamVR.
  491. Changes for v1.0.5:
  492. * Updated to SteamVR runtime build #826021 (v.1445485596).
  493. * Removed TrackedDevices from [CameraRig] prefab (these were only ever meant to be in the example scene.
  494. * Added support for new native plugin interface.
  495. * Enabled MSAA in OpenGL as that appears to be fixed in the latest version of Unity.
  496. * Fix for upside-down rendering in OpenGL.
  497. * Moved calls to IVRCompositor::WaitGetPoses and Submit to Unity's render thread.
  498. * Couple fixes to prevent SteamVR from getting re-initialized when stopping the Editor preview.
  499. * Fix for hitches caused by SteamVR_PlayArea when not running SteamVR.
  500. Changes for v1.0.4:
  501. * Updated to SteamVR runtime build #768489 (v.1441831863).
  502. * Added SteamVR_Skybox for setting a cubemap in the compositor (useful for scene transitions).
  503. * Fix for RenderModels disappearing across scene transitions, and disabling use of modelOverride at runtime.
  504. * Added lockPhysicsUpdateRateToRenderFrequency to SteamVR_Render ([SteamVR] prefab) for apps that want to run their physics sim at a lower frequency. Locked (true) by default.
  505. * Made per-eye culling masks easier to use. (See http://steamcommunity.com/app/250820/discussions/0/535152276589455019/)
  506. * Exposed min/max curve distance settings for high quality overlay. Note: High quality overlay not currently supported in Rift Direct Mode and falls back to normal (flat-only) overlay render path.
  507. * Added 'valid' property to SteamVR_Controller. This is useful for detecting the controller is plugged in before tracking comes online.
  508. Changes for v1.0.3:
  509. * Updated to SteamVR runtime build #710329 (v.1438035413).
  510. * Added SteamVR_Controller.DeviceRelation.FarthestLeft/Right for GetDeviceIndex helper function.
  511. Note: You can also use SteamVR.instance.hmd.GetSortedTrackedDeviceIndicesOfClass.
  512. * Updated and fixed SteamVR_Controller.GetDeviceIndex to act more like people expect.
  513. * Fix for SteamVR_Controller.angularVelocity (velocity reporting has also been fixed in the runtime).
  514. * Renamed SteamVR_Controller.valid to hasTracking
  515. * Removed SteamVR_Overlay visibility, systemOverlayVisible and activeSystemOverlay properties.
  516. * Added collection of handy scripts to Assets/SteamVR/Extras: GazeTracker, IK (simple two-bone),
  517. LaserPointer, Teleporter, TestThrow (with example scene) and TrackedController.
  518. * Fix for hidden area mesh render order.
  519. * Fix for render models not showing up after playing scene once in editor.
  520. * Added controller manager left and right nodes to camera rig. These are automatically disabled while the
  521. dashboard is visible to avoid conflict with the dashboard rendering controllers. If you are handling tracked
  522. controllers using another method, you are encouraged to implement something similar using the input_focus event.
  523. * OpenVR runtime events are now broadcast via the SteamVR_Utils.Event system. The events can be found here:
  524. https://github.com/ValveSoftware/openvr/blob/master/headers/openvr.h and are broadcast in Unity with their
  525. prefix "VREvent_" stripped off.
  526. * Added handling of dashboard visibility and quit events.
  527. * Added SteamVR_Render.pauseGameWhenDashboardIsVisible (defaults to true).
  528. * Allow Unity to buffer up frames for its companion window to avoid any latency introduction
  529. * Lock physics update rate (Time.fixedDeltaTime) to match render frequency.
  530. * SteamVR_Camera (i.e. 'eye' objects) are moved back to the 'head' location when not rendering.
  531. * Simplified SteamVR_Camera Expand/Collapse functionality (now uses existing parent as origin if available).
  532. * Added SteamVR_PlayArea component to visualize different size spaces to target.
  533. * Exposed SteamVR_Overlay.curvedRange for the high-quality curved overlay render path.
  534. Changes for v1.0.2:
  535. * Updated to SteamVR runtime build #655277.
  536. * Added check for new version and prompt to download.
  537. * Moved remaining in-code shaders to separate shader assets.
  538. * Switched RenderModels back to using Standard shader (to avoid having to manually add Unlit to the always load
  539. assets list).
  540. * RenderModels now provides a drop down list populated with available render models to preview. This is useful
  541. for displaying various controller models in Editor to line up attachments appropriately.
  542. * Fix for [SteamVR] instance sometimes showing up twice in a scene between level loads and stomping existing
  543. settings.
  544. * Switched Overlay over to using new interface. Please report any functional differences to the SteamVR forums.
  545. * Added button in example escape menu [Status] to easily switch between Standing and Seated tracking space.
  546. * Miscellaneous color space fixes due to changes in Unity 5.1 rendering.
  547. * Added drawOverlay bool to GameView component to disable rendering the overlay texture automatically on top.
  548. * Eye offsets now get updated at runtime to react to any dynanamic IPD changes.
  549. * Added "hair-trigger" support to SteamVR_Controller.
  550. Changes for v1.0.1:
  551. * Updated to SteamVR runtime build #629708.
  552. * Added accessors to SteamVR_Controller for working with input.
  553. * Added TestController script for verifying controller functionality.
  554. * Added CameraFlip to compensate for Unity's quirk of rendering upsidedown on Windows (was previously
  555. corrected for in the compositor).
  556. * Removed use of UNITY_5_0 defines as this was causing problems with newer versions of Unity 5.
  557. * Shared render target size is now slightly larger to account for overlapping fovs.
  558. * Fix for gamma issues with deferred rendering and hdr.
  559. Note: MSAA is really important for rendering in VR, however, Unity does not support MSAA in deferred rendering.
  560. It is therefore recommended that you use Unity's Forward rendering path. Unity's Forward rendering path also
  561. does not support MSAA when using HDR render buffers. If you need to disable MSAA, you should at least attempt
  562. to compensate with an AA post fx. The MSAA settings for SteamVR's render buffers are controlled via Unity's
  563. Quality settings (Edit > Project Settings > Quality > Anti Aliasing).
  564. Upgrading from previous versions:
  565. The easiest and safest thing to do is to delete your SteamVR folder, and any files and folders in your
  566. Plugins directory called 'openvr_api', 'steam_api' or 'steam_unity' (and variants). Additionally, verify there
  567. are no SteamVR files found in Assets/Editor. Then import the new unitypackage into your project.
  568. This latest version has been greatly simplified. SteamVR_CameraEye has been removed as well as the menu
  569. option from SteamVR_Setup to 'Setup Selected Camera(s)'. The SteamVR_Camera object is instead rendered twice
  570. (once per eye) and the game view rendering handled in SteamVR_GameView. SteamVR_Camera now has 'head' and
  571. 'origin' properties for accessing the associated Transforms, and 'offset' has been deprecated in favor of using
  572. 'head'. By pressing the 'Expand' button below the SteamVR logo in SteamVR_Camera's Inspector, these objects are
  573. automatically created. This is useful for attaching objects appropriately, and removes the need for managing
  574. separate FollowHead and FollowEyes arrays. Similarly, the RenderComponents list is no longer needed as the
  575. SteamVR_Camera is itself used to render each eye. And finally, the button below the SteamVR logo will change to
  576. 'Collapse' to restore the camera to its previous setup.
  577. SteamVR_Camera's Overlay support has been broken out into a separate SteamVR_Overlay component. This can be
  578. added to any object in your scene. If you wish to use it in some scenes, but not others, it is good practice
  579. to add the component to each of your scenes and ensure its Texture is set to None in those that you do not wish
  580. it rendered in.
  581. The experimental binaural audio support has been removed as there are better plugins on the Unity Asset Store now,
  582. and this was an incomplete and unsupported solution.
  583. Files:
  584. Assets/Plugins/openvr_api.cs - This direct wrapper for the native SteamVR SDK support mirrors SteamVR.h and
  585. is the only script required. It exposes all functionality provided by SteamVR. It is not recommended you make
  586. changes to this file. It should be kept in sync with the associated openvr_api dll.
  587. The remaining files found in Assets/SteamVR/Scripts are provided as a reference implementation, and to get you
  588. up and running quickly and easily. You are encouraged to modify these to suit your project's unique needs,
  589. and provide feedback at http://steamcommunity.com/app/250820 or http://steamcommunity.com/app/358720/discussions
  590. Assets/SteamVR/Scenes/example.unity - A sample scene demonstrating the functionality provided by this plugin.
  591. This also shows you how to set up a separate camera for rendering gui elements.
  592. Details:
  593. Note that these scripts are a work in progress. Many of these will change in future releases and we will not
  594. necessarily be able to maintain compatibility with this version.
  595. Assets/SteamVR/Scripts/SteamVR.cs - Handles initialization and shutdown of subsystems. Use SteamVR.instance
  596. to access. This may return null if initialization fails for any reason. Use SteamVR.active to determine if
  597. VR has been initialized without attempting to initialized it in the process.
  598. Assets/SteamVR/Scripts/SteamVR_Camera.cs - Adds VR support to your existing camera object.
  599. To combat stretching incurred by distortion correction, we render scenes at a higher resolution off-screen.
  600. Since all camera's in Unity are rendered sequentially, we share a single static render texture across each
  601. eye camera. SteamVR provides a recommended render target size as a minimum to account for distortion,
  602. however, rendering to a higher resolution provides additional multisampling benefits at the associated
  603. expense. This can be controlled via SteamVR_Camera.sceneResolutionScale.
  604. Note: Both GUILayer and FlareLayer are not compatible with SteamVR_Camera since they render in screen space
  605. rather than world space. These are automatically moved the SteamVR_GameView object which itself is automatically
  606. added to the SteamVR_Camera's parent 'head' object. The AudioListener also gets transferred to the head in order
  607. for audio to be properly spacialized.
  608. Assets/SteamVR/Scripts/SteamVR_Overlay.cs - This component is provided to assist in rendering 2D content in VR.
  609. The specified texture is composited into the scene on a virtual curved surface using a special render path for
  610. increased fidelity. See the [Status] prefab in the example scene for how to set this up. Since it uses GUIText,
  611. it should be dragged into the Hierarchy window rather than into the Scene window so it retains its default position
  612. at the origin.
  613. Assets/SteamVR/Scripts/SteamVR_TrackedObject.cs - Add this to any object that you want to use tracking. The
  614. hmd has one set up for it automatically. For controllers, select the index of the object to map to. In general
  615. you should parent these objects to the camera's 'origin' object so they track in the same space. However, if
  616. that is inconvenient, you can specify the 'origin' in the TrackedObject itself.
  617. Assets/SteamVR/Scripts/SteamVR_RenderModel.cs - Dynamically creates associated SteamVR provided models for tracked
  618. objects. See <SteamVR Runtime Path>/resources/rendermodels for the full list of overrides.
  619. Assets/SteamVR/Scripts/SteamVR_Utils.cs - Various bits for working with the SteamVR API in Unity including a
  620. simple event system, a RigidTransform class for working with vector/quaternion pairs, matrix conversions, and
  621. other useful functions.
  622. Prefabs:
  623. [CameraRig] - This is the camera setup used by the example scene. It is simply a default camera with the
  624. SteamVR_Camera component added to it, and the Expand button clicked. It also includes a full set of Tracked Devices
  625. which will display and follow any connected tracked devices (e.g. controllers, base stations and cameras).
  626. [Status] - The prefab is for demonstration purposes only. It adds an escape menu to your scene.
  627. Note: It uses the SteamVR_Overlay component, which is rather expensive rendering-wise.
  628. [SteamVR] - This object controls some global settings for SteamVR, most notably Tracking Space. Legacy projects
  629. that want their viewed automatically centered on startup if not configured or to use the seated calibrated position
  630. should switch Tracking Space to Seated. This object is created automatically on startup if not added and defaults
  631. to Standing Tracking Space. It also provides the ability to set special masks for rendering each eye (in case you
  632. want to do something differently per-eye) and some simple help text that demonstrates rendering only to the
  633. companion window (which can be cleared or customized here).
  634. GUILayer, GUIText, and GUITexture:
  635. The recommended way for drawing 2D content is through SteamVR_Overlay. There is an example of how to set this up
  636. in the example scene. GUIText and GUITexture use their Transform to determine where they are drawn, so these
  637. objects will need to live near the origin. You will need to set up a separate camera using a Target Texture. To
  638. keep it from rendering other elements of your scene, you should create a unique layer used by all of your gui
  639. elements, and set the camera's Culling Mask to only draw those items. Set its depth to -1 to ensure it gets
  640. updated before composited into the final view.
  641. OnGUI:
  642. Assets/SteamVR/Scripts/SteamVR_Menu.cs demonstrates use of OnGUI with SteamVR_Camera's overlay texture. The
  643. key is to set RenderTexture.active and restore it afterward. Beware when also using a camera to render to the
  644. same texture as it may clear your content.
  645. Camera layering:
  646. One powerful feature of Unity is its ability to layer cameras to render scenes (e.g. drawing a skybox scene
  647. with one camera, the rest of the environment with a second, and maybe a third for a 3D hud). This is performed
  648. by setting the latter cameras to only clear the depth buffer, and leveraging the cameras' cullingMask to control
  649. which items get rendered per-camera, and depth to control order.
  650. Camera scale:
  651. Setting SteamVR_Camera's gameObject scale will result in the world appearing (inversely) larger or smaller.
  652. This can be used to powerful effect, and is useful for allowing you to build skybox geometry at a sane scale
  653. while still making it feel far away. Similarly, it allows you to build geometry at scales the physics engine
  654. and nav mesh generation prefers, while visually feeling much smaller or larger. Of course, if you are building
  655. geometry to real-world scale you should leave this at its default of 1,1,1. Once a SteamVR_Camera has been
  656. expanded, its 'origin' Transform should be scaled instead.
  657. Camera masking:
  658. By manually adding a GameObject with the SteamVR_Render component on it to your scene, you can specify a left
  659. and right culling mask to use to control rendering per eye if necessary.
  660. Events:
  661. SteamVR fires off several events. These can be handled by registering for them through
  662. SteamVR_Events.<EventType>.Listen. Be sure to remove your handler when no longer needed.
  663. The best pattern is to Listen and Remove in OnEnable and OnDisable respectively.
  664. Initializing - This event is sent when the hmd's tracking status changes to or from Unitialized.
  665. Calibrating - This event is sent when starting or stopping calibration with the new state.
  666. OutOfRange - This event is sent when losing or reacquiring absolute positional tracking. This will
  667. never fire for the Rift DK1 since it does not have positional tracking. For camera based trackers, this
  668. happens when the hmd exits and enters the camera's view.
  669. DeviceConnected - This event is sent when devices are connected or disconnected. The device index is passed
  670. as the first argument, and the connected status (true / false) as the second argument.
  671. Keybindings (if using the [Status] prefab):
  672. Escape/Start - toggle menu
  673. PageUp/PageDown - adjust scale
  674. Home - reset scale
  675. I - toggle frame stats on/off
  676. Deploying on Steam:
  677. If you are releasing your game on Steam (i.e. have a Steam ID and are calling Steam_Init through the
  678. Steamworks SDK), then you may want to check ISteamUtils::IsSteamRunningInVRMode() in order to determine if you
  679. should automatically launch into VR mode or not.
  680. Known Issues:
  681. * If Unity finds an Assets\Plugins\x86 folder, it will ignore all files in Assets\Plugins. You will need to
  682. either move openv_api.dll into the x86 subfolder, or move the dlls in the x86 folder up a level and delete
  683. the x86 folder.
  684. Troubleshooting:
  685. * "Failed to connect to vrserver" - This often happens the first time you launch. Often simply trying a second time
  686. will clear this up.
  687. * HmdError_Init_VRClientDLLNotFound - Make sure the SteamVR runtime is installed. This can be found in Steam
  688. under Tools. Try uninstalling and reinstalling SteamVR. Try deleting <user>/AppData/Local/OpenVR/openvrpaths.vrpath
  689. and relaunching Steam to regenerate this file.
  690. * HmdError_Init_HmdNotFound - SteamVR cannot detect your VR headset, ensure the USB cable is plugged in.
  691. If that doesn't work, try deleting your Steam/config/steamvr.cfg.
  692. * HmdError_Init_InterfaceNotFound - Make sure your SteamVR runtime is up to date.
  693. * HmdError_IPC_ConnectFailed - SteamVR launches a separate process called vrserver.exe which directly talks
  694. to the hardware. Games communicate to vrserver through vrclient.dll over IPC. This error is usually due
  695. to the communication pipe between the two having closed. Use task manager to verify there are no rogue apps
  696. that got stuck trying to shut down. Often it's just a matter of the connection timing out the first time
  697. due to long load times. Launching a second time usually resolves this.
  698. * "Not using DXGI 1.1" - Older versions of Unity used DXGI 1.0 which doesn't support functionality the compositor
  699. requires to operate properly. To fix this, we've added a hook to Steam to force DXGI 1.1. To enable this hook
  700. set the environement variable ForceDXGICreateFactory1 = 1 and launch the Unity Editor or your standalone builds
  701. via Steam by manually adding them using the "Add Game..." button found in the lower left of the Library tab.
  702. * Core Parking often causes hitching. The easiest way to disable core parking is to download the tool called
  703. Core Parking Manager, slide the slider to 100% and click Apply.