Open dfitt opened 1 year ago
I wasn't able to reproduce this after launching a mono build a dozen or so times. If you're still seeing this can you post a steamvr system report (directly after the issue happens) and the unity log?
Sure - logs attached.
The mono build of the throwing scene did not show controller models and the held ball did not track with controller motions (but throwing still worked). The il2cpp build was fine. Failure_monoBuild.zip Success_il2cppBuild.zip
There's another unity user with the same issue here: https://forum.unity.com/threads/steamvr-showing-wrong-headset-id-controller-render-models-showing-in-editor-not-in-a-build.1498628/#post-9384725
Yeah I'm having the same issue. Here's where I am with it.
I'm trying to use the SteamVR render models to display the controllers in game. This works fine in the editor and shows the right models. In a build the tracking and input is still fine, but I don't see any controllers.
I'm using the standard steamVR rig. I've tested with the sample scene included with the plugin and it's exactly the same. I've tried uploading to steam and running as a steam app and it's the same.
The problem seems to be how steamVR see the headset. In the editor I get this:
[SteamVR] Initialized. Connected to oculus : Oculus Rift CV1 : WMHD283N4005TS :: rift
In a build I get this:
[SteamVR] Initialized. Connected to 捯汵獵 : 捏汵獵删晩⁴噃1 : 䵗䑈〳丳〶㔰䙅 :: 楲瑦 [SteamVR] [Model] Render model does not support components, falling back to single mesh. [SteamVR] Failed to load render model 捯汵獵损ㅶ损湯牴汯敬彲敬瑦 - InvalidModel [SteamVR] [Model] Render model does not support components, falling back to single mesh. [SteamVR] Failed to load render model 捯汵獵损ㅶ损湯牴汯敬彲楲桧t蹄䐄Ώਜࡄ䐃Јࡄ䐅ఈࡄ䐍จࡄ - InvalidModel
If I delete the 3 SteamVR folders from assets and load the project, then uninstall and reinstall OpenVR, then reinstall the SteamVR plugin, come out of safe mode, and do a build... then the build if fine and has controllers.
If I then restart unity and do another build, the build does not have controllers.
If I use a build that works and apply the steam DRM to the exe (even in compatibility mode), then the controllers stop working.
I've now tried using IL2CPP based on this post, and the build was fine, but again adding DRM breaks it.
In all these cases I have saved the builds and can consistently load them with the same results.
Everything is fine in the editor, but controller models fail to show in builds (usually). Building with il2cpp fixes the problem.
It looks like steamvr is getting garbage strings from openxr for things like trackingsystemname and controllernames at first. Could be a load order issue.
You can repro by creating a new project in 2022.3 using the vr template. Then install steamvr. Go to player settings and set "allow downloads over http" to "allowed in development builds". Switch to the steamvr sample throwing scene. Controller models work in the editor, but will usually fail to show in a mono build.