I am building a cinema for Cardboard, where I want to show 3D sbs videos using a separate screen for each eye. So I'm displaying the left half of the video to the left eye screen. But in order to have the other half in sync, I copied the video as a texture to the right eye screen with the following code: Code (CSharp): void Update () { if(GetComponent<MeshRenderer>().material.mainTexture == null) { if(m_srcMedia != null) { if(m_srcMedia.GetCurrentState() == MediaPlayerCtrl.MEDIAPLAYER_STATE.PLAYING) { GetComponent<MeshRenderer>().material.mainTexture = m_srcMedia.GetVideoTexture(); } } } } This works perfectly, but only when the default texture for the right screen is set to None, hence the Null. This results in a white screen for the right eye, before the video is loaded. How can I add a texture and have it replaced by the videotexture?
Why can't you just have both halves share the same material? That way all objects using that material will get updated in sync.
Because I want to display 3d sbs footage each material has a different offset to let each screen show one half of the video. But I have fixed the problem just by deleting the following line Code (CSharp): if(GetComponent<MeshRenderer>().material.mainTexture == null)
You don't have to use the material uv offset property to have an offset uv; you can just map the uv correctly for each eye in your modelling program.