3
votes

****Update:** I've created a test scene where I've recreated the usage of a canvas with image and text, primitive game objects and the use of two cameras in addition to the Camera Rig, with target textures set to the same render texture. In this state, it worked, however when I installed and upgraded all materials to via the lightweight render pipeline, the render texture turned pink and would not render anything from the cameras. Considering this, my next step forward is to remove the lightweight render pipeline via reverting to a previous commit which does not have the lightweight render pipeline.* If you run into the same situation remember if you do not have a previous commit you can revert to, after removing the lightweight render pipeline you will need to create new materials for all your game objects.*

Problem: In one scene within a VR Project project we are using a world space canvas to display interactable UI. When running through the editor we have no issues, however, when we build the project, all UI canvas's become invisible, though with the use of a laser pointer we can still interact with buttons on the canvas.

I've narrowed the cause down to the use of a specific render texture (only one), which is applied to the target texture of two (2) cameras in the scene. The two cameras are used to provide a live feed to a mesh of the view of a device in the scene.

When I set the two cameras (neither are the main camera in the scene) target texture's to null, that is the only way which I can get the Canvas to appear.

When after running a build I always check the output_log.txt file and have not found any errors.

We are using: Unity 2018.1.3f1, VRTK 3.3.0a, Steam VR w/HTC Vive, Unity's Lightweight Render Pipeline, Post Process layer

There is only one canvas in the scene, with all UI objects as children of that object. Our Canvas set up: Note: I've set the VRTK_UI Canvas component to be inactive to check if that was the cause, and it was not. [Canvas]

Camera One: Note: I've tried clicking the "Fix now" under the target texture, with no change or improvement [CamerOne

Camera 2: Note: I've tried clicking the "Fix now" under the target texture, with no change or improvement [CameraTwo]

Mesh we are Rendering to: [Mesh]

Render Texture: [RenderTexture]

Main Camera: [MainCamera]6

2

2 Answers

1
votes

The lightweight render pipeline was the issue, removing it allowed for everything to work as expected/needed.

0
votes

We have faced the same problem with one camera. Disabling the camera and manually call Render() from another script resolve this issue.