public void LoadByteArray(string fn) { WWWLoader wl = new WWWLoader(); wl.OnComplete += this.__complete; wl.Load(fn); }
public void load(string url) { _url = url; WWWLoader loader = new WWWLoader(); loader.OnComplete += this.OnLoadComplete; loader.OnError += this.OnLoadError; loader.Load(url); }
private void OnLoadComplete(WWWLoader loader) { loader.OnComplete -= this.OnLoadComplete; loader.OnError -= this.OnLoadError; Texture2D texture = (Texture2D)loader.www.assetBundle.mainAsset; Image bm = new Image(texture); this._content = bm; this.DispatchEventObsolete(new EventContext(EventContext.COMPLETE)); }
private void __complete(WWWLoader loader) { loader.OnComplete -= this.__complete; _data = loader.www.bytes; }