Prevent Google Cardboard Pairing / Startup Screen on iOS

坚强是说给别人听的谎言 提交于 2019-12-11 13:57:37

问题


When my google cardboard app starts up for the first time, it launches a Google page that says "Google Cardboard. Let's get you set up. Pair your phone with your viewer for the best experience."

I'd like to control this experience to show my own initial screen before the google cardboard sdk launches. One reason for this is that I want people without cardboard to be able to immediately start experiencing the app in non-cardboard mode without having to go through the pairing process.

I know I can launch the pairing / viewer profile selector later on with the cardboard.ShowSettingsDialog().


回答1:


One way to do this with the current version of the SDK is to have a starter scene without a Cardboard component in it. It will not be in VR, and it won't trigger onboarding.

[edit] The function OnFocus() in CardboardiOSDevice.cs is where it decides to launch the onboarding dialog. You can suppress that by editing this function. But you may want to continue using the onboarding dialog for first time users, rather than the settings dialog, because of it walks them through the scanning process.



来源:https://stackoverflow.com/questions/32341896/prevent-google-cardboard-pairing-startup-screen-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!