Example #1
0
        public void Load(string zip, Action done, Action error, string psw = null)
        {
            mItems = new Dictionary <string, byte[]>();
            Zipper zipper = new Zipper();
            var    file   = UtilsHelper.WWWStreamAssetsPath + zip;

            UtilsHelper.WWWLoad(file, (www) =>
            {
                if (!string.IsNullOrEmpty(www.error))
                {
                    if (error != null)
                    {
                        error();
                    }
                    return;
                }

                zipper.AsyncUnzipToMemary(www.bytes, mItems, psw);
                zipper.Finished += (result) =>
                {
                    if (done != null)
                    {
                        done();
                    }
                };
            });
        }