private void Setup() { Log("Setup"); initialized = true; AssetPostprocessorIndexer.Enable(); AssetPostprocessorIndexer.contentRefreshed -= OnContentRefreshed; AssetPostprocessorIndexer.contentRefreshed += OnContentRefreshed; }
internal void IncrementalUpdate() { var changeset = AssetPostprocessorIndexer.GetDiff(p => !index.SkipEntry(p, true)); if (!changeset.empty) { Log($"IncrementalUpdate", changeset.all.ToArray()); IncrementalUpdate(changeset); } }
public FileSearchIndexer(string type, IEnumerable <SearchIndexerRoot> roots) : base(roots) { this.type = type; minIndexCharVariation = k_MinIndexCharVariation; maxIndexCharVariation = k_MaxIndexCharVariation; skipEntryHandler = ShouldSkipEntry; getIndexFilePathHandler = GetIndexFilePath; getEntryComponentsHandler = (e, i) => SearchUtils.SplitFileEntryComponents(e, entrySeparators, k_MinIndexCharVariation, k_MaxIndexCharVariation); enumerateRootEntriesHandler = EnumerateAssetPaths; AssetPostprocessorIndexer.Enable(); AssetPostprocessorIndexer.contentRefreshed += UpdateIndexWithNewContent; }
public static void Initialize() { if (s_IndexInitialized) { return; } if (s_GlobalIndexer.LoadIndexFromDisk(null, true)) { s_IndexInitialized = true; AssetPostprocessorIndexer.Enable(); AssetPostprocessorIndexer.contentRefreshed -= OnContentRefreshed; AssetPostprocessorIndexer.contentRefreshed += OnContentRefreshed; #if DEBUG_UBER_INDEXING Debug.Log("Search index loaded from disk"); #endif } #if USE_UMPE_INDEXING else if (ProcessService.level == ProcessLevel.UMP_MASTER) { // Launch indexing bot. #if DEBUG_UBER_INDEXING Debug.Log("Launching quick search indexing bot..."); #endif ProcessService.LaunchSlave(k_RoleName, "headless", "true", "disableManagedDebugger", "true", "ump-cap", "disable-extra-resources"); } #else else { s_GlobalIndexer.reportProgress += ReportProgress; #if USE_ASYNC_PROGRESS_BAR Progress.RunTask(k_ProgressTitle, null, s_GlobalIndexer.BuildAsync, Progress.Options.Sticky, -1); #else s_GlobalIndexer.Build(); #endif } #endif }
public static void Initialize() { if (s_IndexInitialized) { return; } if (s_GlobalIndexer.LoadIndexFromDisk(null, true)) { s_IndexInitialized = true; AssetPostprocessorIndexer.Enable(); AssetPostprocessorIndexer.contentRefreshed -= OnContentRefreshed; AssetPostprocessorIndexer.contentRefreshed += OnContentRefreshed; #if DEBUG_UBER_INDEXING Debug.Log("Search index loaded from disk"); #endif } else { s_GlobalIndexer.reportProgress += ReportProgress; s_GlobalIndexer.Build(); } }