コード例 #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();
        }
コード例 #2
0
        public IABManifestLoader()
        {
            assetManifest = null;
            manifestLoder = null;
            isLoadFinish  = false;

            manifestPath = IPathTools.GetWWWAssetBundlePath() + "/" + IPathTools.GetPlatformFolderName(Application.platform);
        }
コード例 #3
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);
        }
コード例 #4
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();
        }
コード例 #5
0
        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);
        }