I want to use WWW Class load a local texture as spotlight cookie. But,this texture cann’t display.
Why???help![]()
var www : WWW ;
var Lcookie : Texture2D ;
function Start () {
www = new WWW ("file://"+Application.dataPath+"/Standard Assets/Light Cookies/1.jpg");
yield www;
Lcookie = www.texture ;
}
function LateUpdate () {
light.cookie = Lcookie ;
}