我与WebGL保持统一。 VideoPlayer在桌面浏览器上还可以,但是在iOS上-不要播放:(
我尝试了 mp4 , ogv , webm ...
using UnityEngine;
using UnityEngine.Video;
public class VideoPlayer : MonoBehaviour
{
void Start()
{
GameObject camera = GameObject.Find("Main Camera");
var videoPlayer = camera.AddComponent<UnityEngine.Video.VideoPlayer>();
videoPlayer.url = System.IO.Path.Combine (Application.streamingAssetsPath, "last-scene_all2.ogv");
videoPlayer.Play();
}
}