Example #1
0
        public void LoadByteArray(string fn)
        {
            WWWLoader wl = new WWWLoader();

            wl.OnComplete += this.__complete;
            wl.Load(fn);
        }
Example #2
0
        public void load(string url)
        {
            _url = url;
            WWWLoader loader = new WWWLoader();

            loader.OnComplete += this.OnLoadComplete;
            loader.OnError    += this.OnLoadError;
            loader.Load(url);
        }
Example #3
0
        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));
        }
Example #4
0
 private void __complete(WWWLoader loader)
 {
     loader.OnComplete -= this.__complete;
     _data              = loader.www.bytes;
 }