はじめに
100 個のテクスチャが格納されている Unity プロジェクトで
[MenuItem( "Tools/Reimport" )] public static void Reimport() { var sw = Stopwatch.StartNew(); AssetDatabase.ImportAsset ( "Assets/Textures", ImportAssetOptions.ForceUpdate | ImportAssetOptions.ImportRecursive ); sw.Stop(); UnityEngine.Debug.Log( sw.Elapsed.TotalSeconds ); }
テクスチャが格納されているフォルダを Reimport した時の処理時間を計測
計測結果
Unity のバージョン | インポート時間 |
---|---|
Unity 2020.3.13f1 | 71 秒 |
Unity 2021.2.7f1 | 43 秒 |