12345678910111213141516171819202122232425262728293031 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.Video;
- public class TestVideo : MonoBehaviour
- {
- float time = 0;
- VideoPlayer video;
- bool state;
- private void Awake()
- {
- video = GetComponent<VideoPlayer>();
- time =0;
- state = true;
- }
- void Update()
- {
- // Debug.Log(time);
- Debug.Log(time+" "+video.frame.ToString());
- time += Time.deltaTime;
- //if(state&&float.Parse( video.frame.ToString())>0)
- //{
- // state = false;
- // Debug.Log(time);
- // Debug.Log(video.frame.ToString());
- //}
- }
- }
|