Forum Discussion

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

Multi-platform development: Building a non-OVR version

We are at the beginning of our Samsung Gear project and are thinking about ways to make the project architecture to support other non VR platforms as well. I know Unity very well but I am newbie in Oculus so sorry if this sounds trivial.

What should I do to setup the project in a way, that I can switch the platform to build an iOS or regular (non-Gear) Android version? Especially for Android the alert to insert the Note 4 into Gear has to be suppressed.

Thanks
Kay

2 Replies

Replies have been turned off for this discussion
  • SAOTA's avatar
    SAOTA
    Honored Guest
    I have an app in development that changes to OVR style camera setup on device rotation just by disabling main camera and enabling a parent with two camera's.

    In initial experiments I also came across a github project that switches based on a keypress if automatic detection fails.
  • kayyo's avatar
    kayyo
    Honored Guest
    Thanks for your hint, I got it. I ended up with 2 prefabs located in Resources folder. Both contain an empty game object and the appropriate camera as child. At app initialisation a small boot loader class determines which prefab to use for camera instantiation.

    The empty parent objects have a component as an interface for providing information needed by other objects e.g. menu etc. These components BasicCameraController and VRCameraController are derived from some AbstractCameraController.

    I tested it on a cheap Android and it works with BasicCameraController. When the VR camera prefab to be used, it crashes - as expected. This is useful in editor testing too, so we don't have the annoying warning popup when Unity's OVRPlayerController is started.