EndSession(ISearchContext)
A function called at the end of a search session.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor.SearchService
- Assembly: UnityEditor
void EndSession(ISearchContext context)
Parameters
The search context.
Remarks
Depending on the type of engine (ISceneSearchEngine, IProjectSearchEngine, IObjectSelectorEngine), a search session ends at different times. For ISceneSearchEngine and IProjectSearchEngine, a search session ends when the query is cleared.
For IObjectSelectorEngine, there are two possibilities:
- The session ends when the selector is closed (see ISelectorEngine.SelectObject).
- The session ends forcefully because another selector will be opened, in which case the current selector needs to be closed because the ObjectSelector API does not support concurrent selectors. See ObjectSelectorSearchEndSessionModes.CloseSelector for an example.
This function is not called again until the next search session ends.
Additional Resources: ISearchEngineBase.BeginSession, ISearchEngineBase.BeginSearch, ISearchEngineBase.EndSearch.