playMaker

Author Topic: url image as texture?  (Read 2780 times)

Megisto

  • Playmaker Newbie
  • *
  • Posts: 28
url image as texture?
« on: March 07, 2012, 06:46:12 PM »
Is it possibile to load an image from an url and use it as texture for my objects using Playmaker?

Using wwwobjects leads me to an error "Movie playback is only possible in Unity Pro". But i am not loading a movie, i am loading an image.

Using standard javascript like

Code: [Select]
var url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg";
function Start () {
     // Start a download of the given URL
    var www : WWW = new WWW (url);

    // Wait for download to complete
    yield www;

    // assign texture
    renderer.material.mainTexture = www.texture;
}

this works just fine.

Megisto

  • Playmaker Newbie
  • *
  • Posts: 28
Re: url image as texture?
« Reply #1 on: March 09, 2012, 02:55:20 AM »
Any good advices?