Exemplo n.º 1
0
        public ABLocalManager(ABLocalSetting setting)
        {
            this.setting         = setting;
            localAssetBundlePath = Path.Combine(Application.persistentDataPath, setting.AssetBundlePath);
            DirectoryInfo dir = new DirectoryInfo(localAssetBundlePath);

            if (!dir.Exists)
            {
                dir.Create();
            }
            versionPath         = Path.Combine(localAssetBundlePath, "Version.json");
            assetBundleListPath = Path.Combine(localAssetBundlePath, "ResourceList.json");
        }
Exemplo n.º 2
0
            public ABLocalManager(ABLocalSetting setting)
            {
                // 初始化储存目录
                LocalAssetBundlePath = Path.Combine(Application.persistentDataPath, setting.AssetBundlePath);
                DirectoryInfo dir = new DirectoryInfo(LocalAssetBundlePath);

                if (!dir.Exists)
                {
                    dir.Create();
                }
                // 初始化Version.json文件
                versionPath = Path.Combine(LocalAssetBundlePath, "Version.json");
                if (!File.Exists(versionPath))
                {
                    Version = setting.DefaultVersion;
                }
                // 初始化ResourceList.json文件
                assetBundleListPath = Path.Combine(LocalAssetBundlePath, "ResourceList.json");
                if (!File.Exists(assetBundleListPath))
                {
                    AseetBundleList = new List <ABInfo>();
                }
            }
Exemplo n.º 3
0
 public ABUpdater(ABRemoteSetting remoteSetting, ABLocalSetting localSetting)
 {
     localManager  = new ABLocalManager(localSetting);
     remoteManager = new ABRemoteManager(remoteSetting, localManager.LocalAssetBundlePath);
 }