I want to fetch a video from my server and save it in my assests to view it later in my game. I am aware of use of www. but i dont understand how to download the video from my server giving it's url. below is the code to get video as a texture.
var www = new WWW("http://Sameer.com/SampleVideo_360x240_2mb.mp4");
var movieTexture = www.movie;
Any idea how do I save the mp4 file ?
Using UnityWebRequest API.
You can use UnityWebRequest
Using obsolete WWW API.
You can use WWW.bytes to get the raw data for movie file, and save that. Something like: