コード例 #1
0
        protected override void DoInit()
        {
            List <string> folders = this.m_folderList.GetFolders();

            foreach (string current in folders)
            {
                SearchObjectInFolderJob task = new SearchObjectInFolderJob(this.m_folderList, current, m_searchType);
                base.Add(task);
            }
        }
コード例 #2
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();
            }
        }