TestVideo.cs 668 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Video;
  5. public class TestVideo : MonoBehaviour
  6. {
  7. float time = 0;
  8. VideoPlayer video;
  9. bool state;
  10. private void Awake()
  11. {
  12. video = GetComponent<VideoPlayer>();
  13. time =0;
  14. state = true;
  15. }
  16. void Update()
  17. {
  18. // Debug.Log(time);
  19. Debug.Log(time+" "+video.frame.ToString());
  20. time += Time.deltaTime;
  21. //if(state&&float.Parse( video.frame.ToString())>0)
  22. //{
  23. // state = false;
  24. // Debug.Log(time);
  25. // Debug.Log(video.frame.ToString());
  26. //}
  27. }
  28. }