Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

WWW trying to display a video from server onto a texture.. help

Discussion in 'Immediate Mode GUI (IMGUI)' started by djgriff, Apr 20, 2015.

  1. djgriff


    May 29, 2014
    Hi i have followed the example from the on unity api for www and amended it to display a movie texture, but it isn't working, I am new to unity and c# as i am coming from java. also pretty new to coding altogether.
    However any suggestion help would be awesome.

    1. i have created a plane
    2. added a PlayMovie.cs to the plane
    3. run with no errors. screen waits then just turns black where the plane is..

    Think i am doing something fundamentally wrong..

    using UnityEngine;
    using System.Collections;
    [RequireComponent (typeof(AudioSource))]
    public class PlayMovie : MonoBehaviour {

    public MovieTexture movieTwo;
    public string url = "";
    WWW www;

    IEnumerator Start () {

    movieTwo = new MovieTexture();
    www = new WWW(url);
    yield return www;
    movieTwo =;

    GetComponent<Renderer>().material.mainTexture = movieTwo;

    Any help appreciated

    Last edited: Apr 20, 2015
  2. djgriff


    May 29, 2014
    Ha got it working.. anyone know how to get sound working?