using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Video; public class PlayeVideoModel : MonoBehaviour { public VideoPlayer videoPlayer; public SCButton playBtn; public SCButton pauseBtn; private void OnEnable() { videoPlayer.Play(); } public void PlayVideoOnClick() { playBtn.gameObject.SetActive(false); pauseBtn.gameObject.SetActive(true); videoPlayer.Play(); } public void PauseVideoOnClick() { playBtn.gameObject.SetActive(false); pauseBtn.gameObject.SetActive(true); videoPlayer.Pause(); } }