private List <string> OnGUISelectMaterialPaths() { // select root directory _materialFullRootDirectory = EditorUtility.OpenFolderPanel("Select Material Root Directory", _materialFullRootDirectory, ""); _materialAssetRootDirectory = UpdaterHelper.GetAssetRelativePath(_materialFullRootDirectory); if (string.IsNullOrEmpty(_materialFullRootDirectory)) { return(null); } // collect material paths var materialPaths = UpdaterHelper.CollectAllFiles(_materialFullRootDirectory, true, "*.mat", "*.MAT"); // show confirm dialog var message = string.Format("There are about [({0})] materials will be updated in directory [\"{1}\"]. this process can NOT be undo.", materialPaths.Count, _materialAssetRootDirectory); if (!EditorUtility.DisplayDialog("Warning !!", message, "Cancel", "Still Continue")) { return(materialPaths); } Debug.LogWarning("Updating Cancelled !!"); return(null); }