TV.updateTVChannel C# (CSharp) Method

updateTVChannel() private method

private updateTVChannel ( ) : void
return void
    private void updateTVChannel()
    {
        tvScreenMesh.material = tvChannelMaterials[currTVChannel];
        if (tvScreenMesh.material.mainTexture is MovieTexture) //not used yet
        {
            if (!((MovieTexture)tvScreenMesh.material.mainTexture).isPlaying)
            {
                ((MovieTexture)tvScreenMesh.material.mainTexture).Play();
            }
        }
        else
        {
            //this is used to turn of render cameras used to render other view
            // for the tv when they are not in use, do not enable if you are using multiple tvs
            if (disableRenderTextureWhenNotInUse)
            {
               disableRenderCamerasIfNotInUse();
            }
        }
    }