1. 程式人生 > >unity SteamVR Plugin匯入後的兩個錯誤的解決辦法

unity SteamVR Plugin匯入後的兩個錯誤的解決辦法

在unity asset store中搜索 SteamVR Plugin,找到官方提供的外掛。我當時下載到的版本是1.2.1的,下載完後匯入到工程裡,開啟裡面的樣例場景(共3個),執行或停止執行時會明顯示卡頓,報錯,其中一個錯誤:

Unity SteamVR: Failed to loadIVRRenderModels interface version IVRRenderModels_005

問題產生原因及解決方法(帖子):

I'm looking into said problem on Unity 5.5.2p2 and currentSteamVR addon. You'll experience it when SteamVR is not running, if yourPlayerSettings VR SDK is set to None (first) and you code manually startsOpenVR as ours does. The problem occurs, when Assets\SteamVR\Scripts\SteamVR_RenderModel.csattempts to touch OpenVR when OpenVR/SteamVR has not yet been initialized.Typically, this happens on scene load, whether at runtime or in editor,wherever the script becomes active and updates. This could possibly bemitigated by checking SteamVR.active and guarding in that script. Update() inthat script does some non-ideal things as well. I'll share when I have aworkable solution, but the appropriate Valve dev may want to chime in.


- thanks

I have a proposed fix to SteamVR\Scripts\SteamVR_RenderModel.cswhich also seems to fix the 'models disappearing on start' problem. I'llcontact Valve through support channels. You can find the file on my OneDrivehere, 
- thanks

還有一個錯誤是初始化時錯誤,shared IPC connection error之類的,這個重啟下Steam或者SteamVR,或者乾脆重啟下電腦即可。