Esempio n. 1
0
        private void UpdateSearchProgress(SearchObjectInFolderListJob job1)
        {
            if (job1 == null)
            {
                return;
            }
            SearchObjectInFolderJob searchObjectInFolderJob = job1.Current() as SearchObjectInFolderJob;
            string           folderPath = searchObjectInFolderJob.FolderPath;
            int              num        = searchObjectInFolderJob.TaskCount();
            int              num2       = searchObjectInFolderJob.CurrentIndex();
            SearchObjectTask searchObjectInPrefabTask = searchObjectInFolderJob.Current() as SearchObjectTask;
            string           filePath = searchObjectInPrefabTask.FilePath;
            string           fileName = Path.GetFileName(filePath);
            bool             flag     = EditorUtility.DisplayCancelableProgressBar("Searching: " + folderPath, "Search in: " + fileName, (float)(num2 + 1) / (float)num);

            if (flag)
            {
                job1.SetFinished();
            }
        }