using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Video; public class VideoManager : MonoBehaviour { private VideoPlayer videoPlayer; public float speed {get; set; } public float raceFinishTime = 30.0f; void Start () { speed = 0.0f; videoPlayer = gameObject.AddComponent(); // TODO: Aspect Ratio is not working? videoPlayer.aspectRatio = VideoAspectRatio.FitOutside; Debug.Log(videoPlayer.aspectRatio); videoPlayer.url = "/home/florent/Stockage/Works/Unity/GoldSprint/Videos/redbull/redbull_30s.webm"; videoPlayer.isLooping = true; videoPlayer.playOnAwake = false; videoPlayer.Prepare(); videoPlayer.Pause(); //videoPlayer.Play(); Run(); } void Update () { videoPlayer.playbackSpeed = speed; } void Run() { videoPlayer.Play(); } void WheelImpulse() { } }