using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class downloadmp4 : MonoBehaviour { private void Awake() { StartCoroutine(LoadAB()); } public string url; byte[] bytes; IEnumerator LoadAB() { string filePath = System.IO.Path.Combine(Application.streamingAssetsPath, url); Debug.Log("loadMp4==" + filePath); //UnityWebRequest request = UnityWebRequest.Get(filePath); using (UnityWebRequest req = UnityWebRequest.Get(filePath)) { yield return req.SendWebRequest(); if (req.error == null) { bytes = req.downloadHandler.data; } else { } } } }