Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

OnPreprocessBuild throws an error if the SDK is even present in a project #954

@andybak

Description

@andybak

Summary:

I have a project that needs to build for several platforms. Some platforms require Unity's XR Supported checkbox to be off. (The same issue would occur for projects that are intended for both VR and non-VR builds). As soon as I add the GVR SDK the builds for other platforms fail with the error: "To use the Google VR SDK on Android, 'Player Settings > Virtual Reality Supported' setting must be checked.
Please fix this setting and rebuild your app." (there are other errors along the same lines)

Why does the GVR SDK assume that adding it to a project means that project will only ever be used for Google VR builds?

Found using:

  • Google VR SDK version: 1.150.0
  • Unity version: 2018.2.4f1
  • Phone manufacturer, model, and O/S version: n/a
  • Viewer manufacturer & model: n/a

Steps to reproduce the issue:

  1. Start a new project
  2. Add Google VR Unity SDK package to the project
  3. Attempt to build an empty scene. The build fails and errors is displayed.

Workarounds:

  1. Add/remove the entire Google VR SDK every time I want to build for a each platform (takes several minutes and means I can't have an automated build pipeline)
  2. Disable the check every time I update the GVR SDK

Additional comments:

Suggested resolution...

  1. Change the error to a warning
  2. Only throw an error if the build contains a scene with a Google VR component in it.
  3. Remove it entirely and assume the user knows what they are doing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions