Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
stupidn00b's avatar
stupidn00b
Explorer
11 years ago

Supporting Mobile and PC SDKs in a Single Unity Project

I made a little tool and editor script to ease the pain of switching between the PC and Mobile SDKs for one of our projects that is targeting both Gear VR and PC. This is a bandaid solution that could easily break with future SDK releases (it's made for 0.4.4 PC and 0.4.2. mobile) but it's already saved us a fair bit of time.

https://github.com/turbobutton/oculus-platform-helper

It also has the camera prefab we use in place of the standard Oculus cameras, which uses the correct Oculus camera based on platform-dependent compilation stuff.

YMMV, and it will likely need adjustments for your own project!

3 Replies

Replies have been turned off for this discussion
  • Can't wait to try this out--we're in the middle of crunch time trying to get out a project on 8 platforms (iOS, iOS Cardboard, Android, Android Cardboard, OS X, PC, Gear VR, and Oculus Rift) all by the end of March and while we've managed to roll up everything but the Rift into one master player controller, we've been wrestling to conceptualize how we can best have both the Rift and the Gear VR files in the project simultaneously.

    Just out of curiosity, because we already have such an intensely programmed platform-switching mechanism in place, would you be willing to share a brief rundown of what the trick you used was? Do they just need two OVR directories in the Project? Any insight would be much obliged, but I'll pass this along to our programmers to look at. Thanks!
  • "vrationrandy" wrote:
    Can't wait to try this out--we're in the middle of crunch time trying to get out a project on 8 platforms (iOS, iOS Cardboard, Android, Android Cardboard, OS X, PC, Gear VR, and Oculus Rift) all by the end of March and while we've managed to roll up everything but the Rift into one master player controller, we've been wrestling to conceptualize how we can best have both the Rift and the Gear VR files in the project simultaneously.


    Hi there, vrationrandy. Would you mind sharing your platform switching code? I am particularly interested in how you can get Gear VR and Android Cardboard to play nicely together.

    Thanks!