在 iOS 上删除 Google Cardboard 配对消息

Remove Google Cardboard pairing message on iOS

我已经开发了一个应用程序,我需要删除第一个 运行 - 上一个 post 出现在 iOS 上的 Google Cardboard 配对消息在这里建议禁用 //device.ShowSettingsDialog(); - 这没有用。

另一个 post 建议编辑 CardboardiOSDevice.cs 中的 OnFocus() () - 但没有解释如何实现这个?

转到Assets/Cardboard/Scripts/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();
    }*/
  }