Exemplo n.º 1
0
        private IEnumerator LoadBundle(WWW www, byte[] data, HandleLoadBundle callback, bool load)
        {
            AssetBundle bundle = null;

            if (load)
            {
                if (www != null)
                {
                    bundle = www.assetBundle;
                }
                else
                {
                    bundle = AssetBundle.CreateFromMemoryImmediate(data);
                }
                yield return(null);
            }
            if (callback != null)
            {
                callback(bundle);
            }
            if (www != null)
            {
                www.Dispose();
            }
            www = null;
            yield break;
        }
Exemplo n.º 2
0
 public void GetBundle(WWW www, byte[] data, HandleLoadBundle callback, bool load)
 {
     base.StartCoroutine(this.LoadBundle(www, data, callback, load));
 }