ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 256 forks source link

Unable to submit eye texture #713

Open mattiasbrand opened 4 years ago

mattiasbrand commented 4 years ago

I've followed the guide to install and use the OpenVR XR Plugin for Unity 2019.3 and 2020.1. In both cases it works great when running from the editor but when I make a standalone build for Windows I get a black screen (even with mirror set to None) and the log says: Unable to submit eye texture

Log for Unity 2020.1 Standard pipeline attached (but the error looks the same with the other configurations mentioned).

Player.log SteamVR-2020-05-06-AM_12_12_11.txt

I get the same error in both Unity versions and also for both URP and Standard pipeline. Bitness is x64. Graphics api DX11.

1runeberg commented 4 years ago

Hi @mattiasbrand - is it possible to get a copy of the build? runeb@valvesoftware.com

1runeberg commented 4 years ago

and can you double check that you have Open VR Settings.asset in your StreamingAssets in your build please?

mattiasbrand commented 4 years ago

I have Open VR Settings.asset, but it's located under Assets\XR\Settings

mattiasbrand commented 4 years ago

TestOpenVRStd.zip

Here's a build with standard pipeline

1runeberg commented 4 years ago

Thanks @mattiasbrand - yeah, the "Open VR Settings.asset" file should've been automatically copied to StreamingAssets\SteamVR by the SettingsCopier.cs

Can you try adding the file in to streamingassets\steamvr and run the build?

Without this, the steamvr session will be initialized by the plugin as "Other" iirc by default instead of a Scene app, hence the 103 error from the compositor ("Not a Scene App" error).

mattiasbrand commented 4 years ago

This line: SettingsCopier OnPostprocessBuild 31: if (target != BuildTarget.StandaloneLinux64 && target != BuildTarget.StandaloneWindows) return;

Don't you support 64 bit builds for Windows? That's what I was building so it hits this early return.

mattiasbrand commented 4 years ago

Changed it to if (target != BuildTarget.StandaloneLinux64 && target != BuildTarget.StandaloneWindows && target != BuildTarget.StandaloneWindows64) return; and now it works!

1runeberg commented 4 years ago

Thanks for the update @mattiasbrand - that code looks like an old internal version of the .cs file, it should certainly do 64bit builds. We'll fix the GitHub copy.

Thanks again for the report! Will keep this open for now.

jeffrey97 commented 4 years ago

Changed it to if (target != BuildTarget.StandaloneLinux64 && target != BuildTarget.StandaloneWindows && target != BuildTarget.StandaloneWindows64) return; and now it works!

Thanks a lot @mattiasbrand for pointing out this code fix... I ran into the exact same issue while building my VR game using this new OpenVR XR plugin and my build executable always ran into a black screen.

On checking the Player logs, I found the same 'Unable to submit eye texture' error, that's when I stumbled upon this issue in the tracker.

On making this code change and rebuilding the Player, it works perfectly on my Vive now...

Request the team to please fix this bug in the plugin code as many users may face this issue while building their project... 👍

ericvanderwal commented 4 years ago

@jeffrey97 , @mattiasbrand , dudes. I would kiss you, but I am social distancing ;)

That worked for me. It also solved the issue of unity crashing suddenly if a VR device is not plugged into the computer while loading the player/game. Thank you very much. Hopefully Steam can push out the change sooner rather than later (as this seems to be effecting lots of people).