Dynamic Texture using Web Player

People, I would like to change the texture of an object “on the fly”, I mean: I would like to choose a file as the new texture for that object, using the Web Player or even the standalone game. I’m trying the OpenFilePanel function but the Game hasn’t menu. Does anyone has any idea on how to do that ?
Tks, Cassio

You probably want to use the WWW class.

var www : WWW = new WWW("some URL here");
yield www;
if (![url]www.error[/url]) {
	renderer.material.mainTexture = [url]www.texture;[/url]
}

You can load files locally by using “file://” instead of “http://”, if you’re using 2.0 or later. If you load files locally, you don’t need to yield.

–Eric