Canvas UI does not render in GVR (Google Cardboard) in Unity 5.3.5
Asked Answered
G

2

7

Background

I am using Unity3D 5.3.5 to develop a Google VR (Cardboard) project

Introduction

I added a canvas button to my scene. It shows up in scene mode and sometimes in Game mode but never when I run the project

What I have tried

  1. Turning off Direct Render for Main Camera
  2. Setting up Render Mode of canvas to World Space
  3. Adding Main Camera to Event Camera

Observations

  1. Button shows up in Scene and Game Mode but not during Play mode
  2. Though the UI does not show up, Physics Raycaster in the reticle hits the button.

Screenshots Below Screenshot of Scene and Game ModeScreenshot of Canvas componentScreenshot of Play Mode

Garbanzo answered 22/6, 2016 at 5:33 Comment(4)
There is an option of Cardboard to set a minimum distance. Objects closer to the camera than that value are hidden. Clipping mask? Sorry I don't have a computer to check.Containerize
Didn't know about the minimum distance. However, this solution did not work in my case. The canvas is at a fair distance and I found that other objects at lesser distance got rendered. Most answers on the internet suggest that it is bug of Unity version I am on. Thanks though!Garbanzo
Very welcome and good to know to not update unity!Containerize
So I had the same issue and upgraded to Unity 5.4 beta. In this version the canvas shows in game mode, but the canvas is a solid bright purple when i run it on the headset...Narial
C
1

This is a Unity bug. In the forums they mentioned it will be fixed in 5.3.5p5.

Its also noted in known issues for gvr:

Starting with 5.3.4p2, a bug in Unity prevents rendering World Space uGUI Canvases into a RenderTexture

https://developers.google.com/vr/unity/release-notes#v080_initial_release

It works in older version(5.3.4f1), if you need to test it right now.

Cityscape answered 22/6, 2016 at 8:25 Comment(1)
Thanks! Any work around that you can suggest other than quads ?Garbanzo
R
0

in your canvas change Render Mode to-> Screen Space Camera

change Render Camera to -> Your camera

change Plane Distance to a very low number but not negative

Ragan answered 12/6, 2017 at 17:18 Comment(1)
only problem i found its off by a few :< but it does render on the screenRagan

© 2022 - 2024 — McMap. All rights reserved.