//Function to check if this context option is disabled for string path public override bool IsDisabled(List <string> paths) { //Only allow one file to be selected if (paths.Count != 1) { return(true); } string absolutePath = GitUtility.RepoPathToAbsolutePath(paths[0]); //Disable if file does not exist (ie moved or deleted) if (!File.Exists(absolutePath)) { return(true); } return(false); }
//Function run when file context option is clicked public override void OnSelect(List <string> paths) { string absolutePath = GitUtility.RepoPathToAbsolutePath(paths[0]); EditorUtility.RevealInFinder(absolutePath); }