[MenuItem("Image/SetReadWriteTrue")]
static void SetReadWriteTrue() {
Debug.LogWarning("开始");
Object[] selectedAsset = Selection.GetFiltered(typeof(Texture), SelectionMode.DeepAssets);
for(int i = 0; i < selectedAsset.Length; i++) {
Texture2D tex = selectedAsset[i] as Texture2D;
TextureImporter ti = (TextureImporter)TextureImporter.GetAtPath(AssetDatabase.GetAssetPath(tex));
ti.isReadable = true;
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(tex));
}
Debug.LogWarning("结束");
}