Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        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();
        }