3

Problem

Display turns black when an object that's potentially being instantiate every frame is in view

How to reproduce

  • Import Cardboard SDK on the Project
  • Assign a script to any appropriate object with the following code.

public GameObject prefab;
void GenerateObject(){
  Instantiate(prefab);
}
void Update(){
if ( once ){
    GenerateObject();
  }
}

  • Attach any appropriate prefab to the prefab above on Unity inspector.
  • Launch the app on android device with "Build and Run".
  • Display turns black when an object that's potentially being instantiate every frame is in view. Settings button will also disappear. When the instantiate object is out of sight, the view turns normal. Settings button will appear.

Environment

Unity Version:5.0.0.1f

Cardboard SDK Version:v0.4.9

Device:Nexus5, nVidia SHIELD Tablet 2

Steven
  • 166,672
  • 24
  • 332
  • 435

2 Answers2

1

There is a known bug between Unity and CardboardSDK. Try setting the build to development in Build Settings in Unity. If this fixes it, you've got your culprit.

With this error, when I wanted a build that could be uploaded to the Play Store, disabling most of the lighting in the scene sometimes helped.

We are all patiently waiting for a fix. Google and Unity are working on it together, but it is said to be a tricky one to catch.

Check out the known issues in SDK release notes.

Known Issues

Unity 5 rendering issues: As of Unity build 5.0.0f4, the following steps should be taken to fix or ameliorate any rendering issues, such as an all-black screen, flashing textures, or non-stereo views: Enable the Development Build option in the Build dialog. This seems to fix various rendering glitches, like flashing textures.

The root cause of the rendering glitches is under analysis, with assistance from Unity.

Note: If you are using any Image Effects, make sure that StereoController's Direct Render property is set to false. Check if that fixes the issue first.

K.L.
  • 2,419
  • 1
  • 21
  • 26
0

I had a black screen glitch and it turned out it was because I had set Stereo Screen Scale to 2 on the Cardboard script. I set it to 1 and the screen came back.

flashfox
  • 69
  • 1
  • 2