mobfish Unity Cardboard SDK, unofficial Cardboard VR SDK for Unity

Since the day we noticed that Apple would reject binaries when using GoogleVR SDK due to deprecate API usage, we started to implement our own solution. With the official Google Cardboard SDK, we are creating our own Unity SDK for Cardboard VR.

Now we present our project:

mobfish Unity Cardboard SDK

the unofficial Cardboard VR SDK for Unity.

The current release version is 1.0

Here is a short video to demostrate the project:

You can find out more on our GitHub project site:

Features:

  • Open Source
  • Simple, independent package
  • Cardboard VR View on smartphone
  • Support Unity 2018.4 and Unity 2019.4
  • iOS and Android Support
  • OpenGL ES 3.0, Metal(iOS) and Vulkan(Android) Support
  • Default Render Pipeline, Scriptable Render Pipeline (URP, HDRP) are supported
  • Ability to set cardboard profile in script
  • Switch between vr and no-vr mode (magic window)
  • Most important, this plugin doesn’t give Apple any new reasons to reject an app, at least for now.

Download link:

We won’t add many features in this project, but we take extensibility in mind. That means, in your own project, you should be able to add features to it without pain.

You can give any feedback here in this post, if you wish to contribute to this project, you can create issue and pull requests.

More information about our company:

mobfish GmbH
mobfish.net

2 Likes

Anyone have experience setting up XR Interaction Toolkit and 3DOF Arm Model using a bluetooth controller? to be used in conjunction with the Cardboard XR Plugin. I could use a link to a post or something. Thanks!

Sorry for the late reply. Our project focused on VR view itself, and we don’t contain or use any interaction framework. But you should be able to use any additional interaction framework without conflict.

We just released beta version 0.6.

Not much happened on our side. We added recenter feature, and makes UI better so that you can use it right away.

In the same time, google has already released their official SDK. We’re happy that they’re finally released. But we won’t abandon our project, at least not in a short time, because we take a different approch and we’re going to use this SDK in our main project. It may not have the best possible performance, but it has better compatibility. We support Metal and OpenGL ES 3.0 Graphic API, and we support Unity 2018.4.

We just released beta version 0.7

Fixed some bugs and updated cardboard sdk to 1.1.0

We released a Release Candidate Verion, 0.8.

Android Support is added.

We released Version 1.0.

Add SRP support.

Hi there,

Great to see it’s at 1.0 status.
Is it possible for it to work alongside ARFoundation, specifically seeing the camera pass through?

The non-VR version works as expected but when switching on VR, the background is just black. The tracking still works and objects rendering but no device camera view.

Thanks in advance!

About that, I’m sorry that we’re unable to add more features. We’ll do bug fix if there is any, but we’re moving forward to other projects and this one is now in “maintainance mode”. However, based on your description, I can offer you some suggestion.

  • The camera no-vr and camera left and right eye should have similar settings, if one doesn’t include a layer to render and another one does, this could happen. But in this case, it would be too easy to make a post here.
  • The camera left and right eye are using “RenderTexture” to project the result on a mesh. I suspect that your camera pass through texture is so special, that these are not projected to RenderTexture, and not showed up in the eye mesh renderer too. If this is the case, you should investigate “CardboardPostCamera” class for DrawMesh process, and “CardboardMainCamera” class for RenderTexture setting. Maybe you can tweak these related objects so that the texture can show up in the eye mesh.
  • I’ve never used ARFoundation before, so maybe you can also find something in your ar camera setting, camera texture settings, or shader itself, so that the ar cam texture is not too special to be captured in the eye camera or rendertexture. Our project has Video Player feature, a video texture showed up in vr mode, so I believe ar cam texture should be similar.

This is great because Google dropped the ball with theirs not supporting metal from the beginning, however yours also has 1 or 2 issues currently, like the scaling is wrong on iPhone 12s which a bit of a deal breaker.

1 Like

VR mode scaling is wrong on iPhone 12 Pro. Can I scale it by myself?

Have you solved this problem yet?

No, it is probably fixable with an update to the Google SDK included with mobfish’s but clearly no one has done this yet and I have not tried. I do not know the source of the wrong dpi data
Edit: fixed in Google’s code that forms part of this sdk - needs porting across

Are you still using this cardboard? Or have you moved to another one? Can you recommend VR cardboard for me?

We have been unable to fix our app fully since Apple broke things with iOS 14. If you do not need metal you should try Google’s plugin, otherwise develop with this.
The iPhone 12 issue is very fixable (not had time to look at), because Google fixed it and mobfish use a modified version of their renderer - just no one seems to have posted the fix yet

Okay. Thank you very much :slight_smile:

Can we import this as a package? Are there any guidelines for same? We are getting an error in GoogleProtocolBuff due to which compilation is not completing.

I tried to build the app on Android in unity 2020 but its error with gradle, can you try to fix this problem? … thanks