using Nfynt; using UnityEngine; public class AutoPlayer : MonoBehaviour { public NVideoPlayer VidPlayer = null; public string url = ""; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { //Invoke("SetSourceUrl",3f); } public void SetSourceUrl() { VidPlayer.Stop(); VidPlayer.Config.VideoSrcPath = "https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/unity6test/StreamingAssets/" +url+".mp4"; Invoke("PlayPauseBtn", 1f); } public void PlayPauseBtn() { VidPlayer.Play(); } }