private void StopVideo() { if (!isVideoPlaying) { return; } Debug.Log("StopVideo ()"); videoPlayer.loopPointReached -= EndReached; if (videoPlayer.isPlaying) { videoPlayer.Stop(); } // Mute microphone microphoneSource.mute = true; isVideoPlaying = false; if (this != null && isActiveAndEnabled) { gameObject.GetComponent <Renderer>().sharedMaterial.mainTexture = texture; webCamTextureToMatHelper.Play(); ShowAllVideoUI(); } }
private void StopVideo() { if (!isVideoPlaying) { return; } Debug.Log("StopVideo ()"); if (videoPlayer.isPlaying) { videoPlayer.Stop(); } gameObject.GetComponent <Renderer> ().sharedMaterial.mainTexture = texture; webCamTextureToMatHelper.Play(); isVideoPlaying = false; ShowAllVideoUI(); }