public static void MarkAssetBundle() { AssetDatabase.RemoveUnusedAssetBundleNames(); string path = Application.dataPath + "/Art/Scenes/"; DirectoryInfo dir = new DirectoryInfo(path); // dir.Create(); FileSystemInfo[] fileInfo = dir.GetFileSystemInfos(); for (int i = 0; i < fileInfo.Length; i++) { FileSystemInfo tmpFile = fileInfo[i]; if (tmpFile is DirectoryInfo)//操作场景文件夹 { string tmpPath = Path.Combine(path, tmpFile.Name); Debug.Log(tmpPath); SceneOverView(tmpPath); } //else { // Debug.Log(tmpFile); //} } string outPath = IPathTools.GetAssetBundlePath(); CopyRecord(path, outPath); AssetDatabase.Refresh(); }
public IABManifestLoader() { assetManifest = null; manifestLoder = null; isLoadFinish = false; manifestPath = IPathTools.GetWWWAssetBundlePath() + "/" + IPathTools.GetPlatformFolderName(Application.platform); }
/// <summary> /// /// </summary> /// <param name="fileName">场景名字 sceneone</param> public void ReadConfiger(string sceneName) { string textGileName = "Record.txt"; string path = IPathTools.GetAssetBundlePath() + "/" + sceneName + textGileName; dicAllAsset = new Dictionary <string, string>(); //abManager = new IABManager(sceneName); ReadConfig(path); }
public static void BuildAssetBundle() { //string outPath = Application.streamingAssetsPath + "/AssetBundle"; string outPath = IPathTools.GetAssetBundlePath(); if (!Directory.Exists(outPath)) { Directory.CreateDirectory(outPath); } BuildPipeline.BuildAssetBundles(outPath, 0, EditorUserBuildSettings.activeBuildTarget); AssetDatabase.Refresh(); }
public void Init(string bundleName, LoadProgrecess loadProgress) { IsLoadFinish = false; this.progrecess = loadProgress; this.bundleName = bundleName; assetLoader = new IABLoader(loadProgress, LoadBundleFinish); assetLoader.SetBundleName(bundleName); Debug.Log(bundleName); string bundlePath = IPathTools.GetWWWAssetBundlePath() + "/" + bundleName; // string bundlePath = "file:///E:/Windows" + "/" + bundleName; assetLoader.LoadResources(bundlePath); }