Hotrian / OpenVRDesktopDisplayPortal

Put your favorite Desktop Window directly into any OpenVR game!
Other
445 stars 97 forks source link

Adds Unity 5.4+ Support #43

Open bjennings76 opened 7 years ago

bjennings76 commented 7 years ago

This branch tweaks a bunch of the #if defs to change UNITY_5_3 to UNITY_5_3_OR_NEWER so Unity 5.4+ will be able to open and compile the project as well.

bjennings76 commented 7 years ago

Note: There are a number of warnings on deprecated calls that pop up, but I wasn't sure in what version of Unity those calls changed, so I wasn't comfortable fixing them with more #ifs.

Hotrian commented 7 years ago

Does OVRDDP work properly in 5.4? When I tried porting to 5.4 I found that Unity insisted on launching OVRDDP as a regular Application, and (IIRC) drawing a scene. Currently it launches as an Overlay application, which allows it to run through OpenVR without drawing a scene (and allowing other applications to draw the scene). I tried a few different ways to override Unity 5.4 launching it as a regular Application, but I couldn't get it to work correctly.

Can you try launching your version and running it in a game? If both can draw at the same time then OVRDDP is not launching as a regular application. If OVRDDP is closed when you launch another game, then Unity is launching it as a regular VR application and not as an Overlay application.

Edit: Thanks for the help either way though!

Hotrian commented 7 years ago

I may have been mistaken as I attempted to use Unity 5.4's Native VR Support and it looks like you just worked around that. I'll give this a test when I have a chance and see how it goes. I don't have any deprecated warnings in 5.3.5f1 so I believe any warnings you are getting are regarding 5.4's Native support being ignored.

bjennings76 commented 7 years ago

Hmm... well everything was working well for me except those compile warnings. I'll be sure to go through and fix those warnings up too with some UNITY_5_4_OR_NEWERs. But yeah, probably going to the native stuff would be ideal one day.

On Thu, Aug 25, 2016 at 12:14 AM Nicholas Ewalt notifications@github.com wrote:

I may have been mistaken as I attempted to use Unity 5.4's Native VR Support and it looks like you just worked around that. I'll give this a test when I have a chance and see how it goes. I don't have any deprecated warnings in 5.3.5f1 so I believe any warnings you are getting are regarding 5.4's Native support being ignored.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hotrian/OpenVRDesktopDisplayPortal/pull/43#issuecomment-242041469, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh8T2bUieI2O2VaQ2S0l04Rwe_a81ZDks5qjDWvgaJpZM4Jr5S3 .