Forum Discussion
kayyo
10 years agoHonored Guest
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 Oc...
kayyo
10 years agoHonored 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.
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.
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
- 9 months ago