public RawImage image;
WWW www;
public Text text;
// Use this for initialization
void Start () {
Button btn = this.GetComponent ();
btn.onClick.AddListener (LoadImagH);
}
void LoadImagH(){
StartCoroutine( LoadImagWWW());
}
IEnumerator LoadImagWWW(){
var path =Application.streamingAssetsPath +"/test1.png";
www = new WWW(path);
yield return www;
//www.LoadImageIntoTexture
image.texture = www.texture;
}
here is my erro out put:
2018-03-29 11:18:44.250266+0800 ProductName[4175:1597220] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
2018-03-29 11:18:44.252816+0800 ProductName[4175:1597304] TIC TCP Conn Failed [5:0x1d0367680]: 1:61 Err(61)
2018-03-29 11:18:44.252854+0800 ProductName[4175:1597304] Task <21FEF691-0BAF-4EB1-B36F-6C12D2487A16>.<0> HTTP load failed (error code: -1004 [1:61])
2018-03-29 11:18:44.253032+0800 ProductName[4175:1597180] NSURLConnection finished with error - code -1004