Forum Discussion
xhonzi
10 years agoHonored Guest
Should main .exe launch on Rift? How?
As mentioned here: viewtopic.php?f=37&t=23400
Unity 4.6 and OVR SDK 0.6.0 are no longer producing a DirectToRift.exe. Supposedly this is because the main .exe should now be able to target the Rift.
However, this is not my experience with it. Apparently it works under certain conditions and not in others.
Do we understand those conditions? Direct vs Extended mode? What aspect of the OVR Unity code is responsible for targeting the Rift monitor?
I've tried several projects and they all fail to target the Rift correctly. I've brought forward _DirectToRift and that still seems to work.
I'd like to remove _DirectToRift and just use the single exe.
Help?
Unity 4.6 and OVR SDK 0.6.0 are no longer producing a DirectToRift.exe. Supposedly this is because the main .exe should now be able to target the Rift.
However, this is not my experience with it. Apparently it works under certain conditions and not in others.
Do we understand those conditions? Direct vs Extended mode? What aspect of the OVR Unity code is responsible for targeting the Rift monitor?
I've tried several projects and they all fail to target the Rift correctly. I've brought forward _DirectToRift and that still seems to work.
I'd like to remove _DirectToRift and just use the single exe.
Help?
9 Replies
Replies have been turned off for this discussion
- xhonziHonored GuestBump? Is there no guidance on this? It doesn't seem to work for many of us.
- cyberealityGrand ChampionI believe the single exe only works with Unity 5.1. For Unity 4.6 you should still need the DirectToRift. I'm not sure why it wouldn't export. Do you have the optimize for VR checked in the properties?
- xhonziHonored GuestCyber- I think you have it backwards.
This is from https://developer.oculus.com/downloads/ ... tegration/:
Eliminated the need for the DirectToRift.exe in Unity 4.6.3p2 and later.
If you look at the OVR shim, it only detects 4.X and over 4.6.
4.6 is definitely not generating the DirectToRift.exe. 5.0 is. Not sure about 5.1. - xhonziHonored GuestBump.
- cyberealityGrand ChampionYeah, you're right. I have Unity 4.6.5p3 and it DOES NOT create DirectToRift but the exe DOES still work.
- xhonziHonored GuestI guess that's the point- it doesn't work in some cases, but does in others. Do we understand these cases?
Is there a DirectX 9 vs 11 issue here? - cyberealityGrand ChampionDirectX9 is no longer supported.
- xhonziHonored GuestLooks like I missed that. I switched my game to Dx11.
Regular EXE still launches on main monitor. Anything else I should be checking?
EDIT: Just reading the Shim a little more- you can force the DirectToRift exe to get delivered if you mess with the _useAutoPatcher bool. Probably not recommended.
There's a comment there about has PreInitSupport that says:
//If true, Unity can use OculusInitPlugin instead of _DirectToRift.exe.
Soo... how do we troubleshoot the OculusInitPlugin? Where is it? Is it sealed in the dll? - xhonziHonored GuestI see the OculusInitPlugin.dll in the plugins directory. Anything special to make it work? I don't see anything referencing it anywhere. My Dx11 build still doesn't launch on Rift without DirectToRift.
EDIT: A quick inspection into the .dll shows that it only has one exported function: UnitySetGraphicsDevice. You can do some reading about it here: http://docs.unity3d.com/Manual/NativePl ... rface.html
Looks like it should get called when Unity first starts the graphics engine, and theoretically can determine which monitor is the Rift.
It doesn't answer why it's not working on my project (either Dx11 or Dx9)... but it's interesting.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 1 year ago
- 1 year ago
- 4 months ago
- 22 days ago