Confusing behaviour with auto deleted scripts on installation of OpenVR
I have had a rather frustrating bug for the last 2 days which was caused by a confusing behaviour during the install process of SteamVR.
SteamVR was not installing OpenVR.
Because I am working on a product which expects some users to not be able to use the internet to install any package. We are bundling the whole SteamVR package... or so I thought.
After investigating this problem I have found out that after the installation of OpenVR the install scripts are automatically deleted. Preventing any futur install if you ship the package as is.
The workaround is reimporting the package once more so that the scripts are present and not deleted.
@oyagci You just saved my sanity. I just spent far too long trying to figure out why I couldn't find types like HmdMatrix34_t, or ETrackingResult. I had kept deleting the SteamVR folder and re-importing getting stuck each time, which was getting me nowhere. I was even importing both directly from the asset store and the package on this repo, but perhaps something in Unity has changed that causes the install scripts not to run.
So, I had to manually install the OpenVR plugin, by performing these steps:
- Copied
<project>\Assets\SteamVR\OpenVRUnityXRPackage\Editor\com.valvesoftware.unity.openvr-1.1.4.tgzout of my assets folder. - Deleted directory:
<project>\Assets\SteamVR. - Removed
OpenVR XR Plugin 3.0.0via Unity Package Manager. - Extracted
<project>\Assets\SteamVR\OpenVRUnityXRPackage\Editor\com.valvesoftware.unity.openvr-1.1.4.tgzto<project>\Packages. - Renamed the folder
packagetocom.valvesoftware.unity.openvr-1.1.4(Not strictly necessary, but for my sanity.) - Going back to Unity, it will find and import the package just because it was in that folder it seems.
- Finally re-imported SteamVR Plugin, this time everything went happy.
I'm not sure what's falling apart in just directly importing the package, but there's definitely something funky going on. (I'm currently on Unity 2020.3.22f1.)
Replying to https://github.com/ValveSoftware/steamvr_unity_plugin/issues/982#issuecomment-964271381
I did that but didn't solve anything, i stil get the ETrackingResult errors and others
Replying to https://github.com/ValveSoftware/steamvr_unity_plugin/issues/982#issue-987565772
Reinstalled steamvr package many times but i get errors anyways
Do not install version 3.0.0 of the OpenVR XR Plugin when using the SteamVR plugin. Leave OpenVR XR on version 1.1.4.