Rendering OnGUI elements on 3d object / Unity Free / Stereo Cameras

Hello, I’m using 2 cameras for stereo purpose (one for left eye, one from right eye).
Everything works fine, but at the moment I did not find a good way to have GUI rendered correctly so I can see it on both eyes.

The GUI seems to be rendered after the two cameras so I’ve tried to render it into a texture and map it onto a 3d object.
I don’t know if it’s a Unity Free limitation or that I did something wrong but it does not work as expected.

Any help would be appreciated ! Thanks a lot in advance !

So here is a quick summary of what I did at the moment (which works fine if I do it with a camera instead of the object with the GUI script) :

  • created a GameObject for GUI management an assigned the GUI script thereafter
  • created a material in project and assigned it to the “guiToMaterial” by drag/drop
  • created a quad in front of the camera and drag/dropped the same material

GUI script extract:

public Material guiToMaterial = null; // <= assigned from Unity UI
private RenderTexture renderedTexture = null;

void Awake()
{
    renderedTexture = new RenderTexture(Screen.width, Screen.height, 0);
    guiToMaterial.mainTexture = renderedTexture;

}

private void OnGUI()
{
   RenderTexture.active = renderedTexture;

   //GUI.Button...

   RenderTexture.active = null;
}

Did you set the render texture as target texture to a camera. So the camera will copy its view into this texture?