I was looking and searching through the Web for a long time and still couldn’t find a single post about “How to package an Unreal Engine game for SteamVr”.
I’ve made a very simple VR project which works with my Oculus Rift when using VR preview (if I run the UE4 editor with administrator rights).
But when I package my Game and try to start it in SteamVR it doesn’t work. The Projects starts, but not in Vr - just on my monitor.
I’m having this issue now as well, since disabling SteamVR, my packaged exe won’t launch in my Rift. I even have Enable HMD in the blueprint as well, and auto possess player 0, still won’t send to Rift. Any thoughts?
Yes, it works inside the Editor, VR Preview works. Sends to my rift. I can move and see my hands. When I package, I launch the exe, it won’t connect to the rift. I just see the game on my monitor, not in the HMD. I have auto possess on player 0 and also Start in VR enabled.
You’re probably using 4.18, the Rift driver is not good. There’s a build for 4.18.3 in oculus site but it’s just better if you can upgrade to 4.19. At least that was my solution when I had this problem with Rift.
I hope this helps.
Inside the Level Blueprint. (Access inside the main Window on Blueprints → Open Level Blueprint) and after “Begin Play” you need to add Enable HMD (ticked!)
Nope, niether of these work. I’m on the 4.21 Oculus Branch. I think it’s a bug in the branch or something. I’m going to roll back to 4.20.3 Epic branch and see if it all works there again.
4.20.3 got a really dirty driver problem with AMD Graphic Cards for Oculus Rift (which is really bad, because the game should run on AMD 290 before it gets onto the Oculus Store). That’s why I’m changing to 4.21, I will look if it works for me and write you back soon.
Maybe you didn’t got a notification:
Works for me. 4.21. I used the Oculus plugin for the Oculus Store. Maybe you need to enable the OpenVR/SteamVR plugin inside Unreal engine?
To follow up, nope neither worked still. I rolled back to 4.20.3, kept SteamVR plugin enabled, went to build, manually remove openvr_api.dll and then upload to Store and it worked. Not sure why it wouldn’t work this way in 4.21.
Yes, see… let’s start over. This is the whole problem.
Was working in 4.20.3. For Rift. Epic Branch. Everything was good.
I tried to update to both Oculus and Epic branch of 4.21 with this specific project. When using the VRBlueprints and the VRPawn that Unreal provides, there are certain calls to SteamVR inside of it for chaperone and other things. So, you have to keep SteamVR enabled for that stuff. If you package an eye for the Oculus Store, it will create an OpenVR folder in third parties, which has a openvr_api.dll file inside of it. You CANNOT upload to the Oculus store with openvr_api.dll inside of your package. It won’t allow you to. SteamVR Plugin is what adds openvr_api.dll to the package. In 4.20.3 I was able to just manually delete openvr_api.dll after I packaged, then uploaded the package and everything worked fine.
This is where the problem came in. In 4.21, if I do exactly the same, manually delete openvr_api.dll, the game will not launch. So, I said, okay, I need to remove openvr_api.dll prior to packaging, how do I do this? I have to disable SteamVR Plugin. I do that, now openvr_api.dll is gone. I also had to remove some calls to Steam Chaperone and other things in the UE4 VRPawn blueprint to get the blueprint to compile correctly. After doing ALL of this, I package, but now it doesn’t load into the Rift at all. Nothing. Just idles on the desktop. All other options are identical.
I wasted a lot of time with it last week. Over the weekend I decided to just rollback to 4.20.3, because I don’t need 4.21 right now on Rift, and everything now seems to work again perfectly fine.
I’m also using the Oculus 4.21 branch to dev for mobile now as well, but keeping my Rift project on 4.20.3 because it all works and nothing breaks that way. I hope this clears up my post. I never found a solution, but decided to rollback instead. Thanks for trying to help.
Well. I can tell you what I did. I don’t know why it didn’t worked for you. But I created a project for 4.20 via Epic Launcher (worked on it) and enabled HMD in Level Blueprint, disabled OpenVR/SteamVR and deleted the BP notes for the Steam Chaperone inside the MotionControllerBP.
But because of a weird rendering bug inside the 4.20 Epic branch (Oculus Submission Test Plan VRC 1.7 - black distortions) I changed the Project to 4.21 and it still works fine.