123456789101112131415161718192021222324252627 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class ShowVideoManager : MonoBehaviour
- {
- public string url;
- AVProVideoPlayer avpro;
- private void OnEnable()
- {
- if(url!=null&& url!="")
- {
- avpro = this.GetComponent<AVProVideoPlayer>();
- avpro.SetUrl(url);
- avpro.Play();
- }
- }
- private void OnDisable()
- {
- if(avpro!=null)
- {
- avpro.Stop();
- }
- }
- }
|