GetVideoTexture() public method

public GetVideoTexture ( ) : Texture2D
return UnityEngine.Texture2D
Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (m_srcVideo != null)
     {
         if (m_srcVideo.GetCurrentState() == MediaPlayerCtrl.MEDIAPLAYER_STATE.PAUSED || m_srcVideo.GetCurrentState() == MediaPlayerCtrl.MEDIAPLAYER_STATE.PLAYING)
         {
             if (m_srcVideo.GetVideoTexture() != null)
             {
                 if (transform.GetComponent <MeshRenderer>().material.mainTexture != m_srcVideo.GetVideoTexture())
                 {
                     transform.GetComponent <MeshRenderer>().material.mainTexture = m_srcVideo.GetVideoTexture();
                 }
             }
         }
     }
 }