Unityです。
OnPostprocessTexture(), OnPreprocessTexture() あたりで
ゴニョゴニョしたいときとかに。
Selection.GetFiltered (typeof(UnityEngine.Object), SelectionMode.DeepAssets)
.ToList ()
// ディレクトリは除外
.Where (o => {
string path = AssetDatabase.GetAssetPath (o);
return !System.IO.Directory.Exists (path);
})
.ToList ()
.ForEach (o => {
var selectedPath = AssetDatabase.GetAssetPath (o);
AssetDatabase.ImportAsset (selectedPath);
});