Streaming Movie From A File In Unity


using System;
using UnityEngine;
using System.Collections;
public class ATest : MonoBehaviour
    public MovieTexture movieTexture;
    protected bool streamReady = false;
    void Start ()
    protected IEnumerator StartStream (String url)
        WWW videoStreamer = new WWW (url);
        movieTexture =;
        audio.clip = movieTexture.audioClip;
        while (!movieTexture.isReadyToPlay) {
            yield return 0;
        audio.Play ();
        movieTexture.Play ();
        streamReady = true;
    void OnGUI ()
        if (streamReady) {
            GUI.DrawTexture (new Rect (0, 0, Screen.height, Screen.width), movieTexture);    


This is a simple proof of concept for streaming a ogv file from the disk. Loading an ogv from an asset bundle is painful because the bundle takes so long to load if you have a few movies that are large. In my case I have several that total over 100MB.

Snippet Usage

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.