steamvr_unity_plugin icon indicating copy to clipboard operation
steamvr_unity_plugin copied to clipboard

Confusing behaviour with auto deleted scripts on installation of OpenVR

Open oyagci opened this issue 4 years ago • 4 comments

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 avatar Sep 03 '21 09:09 oyagci

@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.tgz out of my assets folder.
  • Deleted directory: <project>\Assets\SteamVR.
  • Removed OpenVR XR Plugin 3.0.0 via Unity Package Manager.
  • Extracted <project>\Assets\SteamVR\OpenVRUnityXRPackage\Editor\com.valvesoftware.unity.openvr-1.1.4.tgz to <project>\Packages.
  • Renamed the folder package to com.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.)

nitz avatar Nov 09 '21 15:11 nitz

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

dpggit avatar Dec 25 '21 23:12 dpggit

Replying to https://github.com/ValveSoftware/steamvr_unity_plugin/issues/982#issue-987565772

Reinstalled steamvr package many times but i get errors anyways

dpggit avatar Dec 25 '21 23:12 dpggit

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.

CosmicElysium avatar Jan 05 '23 12:01 CosmicElysium