Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Wrong view when import google cardboard sdk with Unity 6.0

Discussion in 'AR/VR (XR) Discussion' started by gregshao, Jun 8, 2017.

  1. gregshao

    gregshao

    Joined:
    May 26, 2017
    Posts:
    15
    Could anyone tell me how to set up google cardboard sdk with the newest Unity? When I import the sdk, the view looks upload_2017-6-7_23-40-15.png
    not like upload_2017-6-7_23-40-49.png

    The new Unity and new google cardboard sdk are so different from online tutorials. Please somebody help!!!
     
  2. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,091
    Google cardboard 1.50 does not support in-editor stereoscopic view anymore.
    Btw unity 6.0 doesn't exist so I assume you meant 5.6.x

    For iOS use 5.6.0f3 or 5.6.1p2
    The rest of the 5.6 versions are pretty much broken for iOS cardboard support
     
  3. gregshao

    gregshao

    Joined:
    May 26, 2017
    Posts:
    15
    Hello my friend, thanks for the correction, my Unity version is 5.6.1f1, how do I change the version? Also, I found I need change some player setting in order to enable VR is that true.

    Since google cardboard 1.5 does not support in-editor stereoscopic view, so I can only deploy to my phone and see what's going on for my app?

    Also when you mean broken, did you mean when you build the ios project it says
    Apple Mach-O Linker Error?
     
    Last edited: Jun 8, 2017
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    No I think he is talking about a distortion in scene rendering on device. For the linker issue you are running into this most likely:

    Google distributes the Cardboard Native Development Kit (NDK) for iOS through the [Cocoapods library management system](https://cocoapods.org). Unity is integrated with a specific version of that Cardboard NDK from the Cocoapods manager and uses the NDK to create your XCode project. This means the resulting project is generated differently from a standard Unity project; Cocoapods creates a wrapping XCode workspace that contains the Unity project as well as a project for the Cardboard NDK library and its dependencies. Always make sure that you open and/or use the workspace and not just the project to avoid getting linker errors due to the missing libraries from Cocoapods.
     
  5. gregshao

    gregshao

    Joined:
    May 26, 2017
    Posts:
    15
    Hi Joe,
    Could you provide more detail about how to use Cocoapods?

    Greg
     
  6. homeros

    homeros

    Joined:
    Dec 23, 2009
    Posts:
    121
    You don't need much detail to build. All you have to do is open XCode workspace rather than Xcode project and build from there. If this still seems confusing to you, hitting "Build and Run" instead of "Build" also starts building the XCode workspace.
     
    behram likes this.
  7. gregshao

    gregshao

    Joined:
    May 26, 2017
    Posts:
    15
    Thanks Joe! Your information helped me a lot!! I made it working!!!
     
  8. behram

    behram

    Joined:
    Jun 21, 2016
    Posts:
    18
    Thank you so much Homeros and Joejo. Building from workspace fixed it !

    Cheers,
    b