在iOS上删除Google Cardboard配对消息

时间:2016-08-30 09:37:12

标签: c# ios unity3d google-cardboard

我开发了一个应用程序,我需要摆脱iOS首次运行时出现的Google Cardboard配对消息 - 此前的帖子建议禁用//device.ShowSettingsDialog(); - 这没用。

另一篇文章建议在CardboardiOSDevice.cs(Prevent Google Cardboard Pairing / Startup Screen on iOS)中编辑OnFocus() - 但是没有解释如何实现这个目标?

1 个答案:

答案 0 :(得分:1)

转到资产/纸板/脚本/ VRDevices ,打开CardboardiOSDevice。cs。

寻找这个功能:

  public override void OnFocus(bool focus) {
    if (focus && (debugOnboarding || !isOnboardingDone())) {
      debugOnboarding = false;
      launchOnboardingDialog();
    }
  }

然后注释掉里面的一切。

 public override void OnFocus(bool focus) {
    /*if (focus && (debugOnboarding || !isOnboardingDone())) {
      debugOnboarding = false;
      launchOnboardingDialog();
    }*/
  }