if(EditorUtility.DisplayDialog("Material Upgrader","You must select at least one material.","Ok"))
return;
Debug.Log(selection.Length);
for(inti=0;i<selection.Length;i++)
{
if(UnityEditor.EditorUtility.DisplayCancelableProgressBar(progressBarName,string.Format("({0} of {1}) {2}",i,selection.Length,lastMaterialName),(float)i/(float)selection.Length))