Esempio n. 1
0
        void EditDirectory(MainAssetInfo directory)
        {
            if (!directory.IsDirectory)
            {
                return;
            }

            foreach (MainAssetInfo asset in directory.GetAllChildren())
            {
                if (asset.Asset is MonoScript || asset.Asset is Shader || asset.Asset is TextAsset)
                {
                    EditScript(asset);
                }
            }
        }
        //アセットバンドルのリストを取得
        List <MainAssetInfo> MakeAssetBudleList(MainAssetInfo inputDirAsset)
        {
            List <MainAssetInfo> assets = new List <MainAssetInfo>();

            //指定ディレクトリ以下のアセットを全て取得
            foreach (MainAssetInfo asset in inputDirAsset.GetAllChildren())
            {
                if (asset.IsDirectory)
                {
                    continue;
                }
                if (IsIgnoreAssetBundle(asset))
                {
                    continue;
                }
                assets.Add(asset);
            }
            return(assets);
        }
Esempio n. 3
0
        //まとめる対象のテクスチャをロード
        static List <TextureInfo> LoadTextures(DicingTextures target)
        {
            List <TextureInfo> textures = new List <TextureInfo>();
            MainAssetInfo      dir      = new MainAssetInfo(target.InputDir);

            int count = 0;
            List <MainAssetInfo> assets = dir.GetAllChildren();

            foreach (var asset in assets)
            {
                if (asset.Asset is Texture2D)
                {
                    textures.Add(new TextureInfo(asset.Asset as Texture2D, target));
                }
                ++count;
                DisplayProgressBar(target, 0.3f * count / assets.Count, "Load Textures");
            }
            return(textures);
        }
Esempio n. 4
0
            //ファイルのコンバート
            void Build(bool isRebuild, DicingFolderData folderData)
            {
                MainAssetInfo inut    = new MainAssetInfo(folderData.InputFolder);
                MainAssetInfo output1 = new MainAssetInfo(folderData.OuputFolder1);
                MainAssetInfo output2 = new MainAssetInfo(folderData.OuputFolder2);

                foreach (var child in inut.GetAllChildren())
                {
                    //ディレクトリのみ検索
                    if (!child.IsDirectory)
                    {
                        continue;
                    }

                    //子以下のフォルダは対象にしない
                    if (FilePathUtil.GetDirectoryPath(child.AssetPath) != inut.AssetPath)
                    {
                        continue;
                    }

                    Build(child, output1, output2, isRebuild);
                }
                AssetDatabase.Refresh();
            }