Library/PackageCache/com.unity.quicksearch@1.6.0-preview.8/Editor/SearchUtils.cs
/// <summary>
/// Select and ping multiple objects in the Project Browser.
/// </summary>
/// <param name="items">Search Items to select and ping.</param>
/// <param name="focusProjectBrowser">If true, will focus the project browser before pining the objects.</param>
Select and ping multiple objects in the Project Browser.
Select and ping multiple objects in the Project Browser .
public static void SelectMultipleItems(IEnumerable<SearchItem> items, bool focusProjectBrowser = false)
        {
            Selection.objects = items.Select(i => i.provider.toObject(i, typeof(UnityEngine.Object))).Where(o=>o).ToArray();
            if (Selection.objects.Length == 0)
                return;
            EditorApplication.delayCall += () =>
            {
                if(focusProjectBrowser)
                    EditorWindow.FocusWindowIfItsOpen(Utils.GetProjectBrowserWindowType());
                EditorApplication.delayCall += () => EditorGUIUtility.PingObject(Selection.objects.LastOrDefault());
            };
        }
public static void SelectMultipleItems ( IEnumerable < SearchItem > items , bool focusProjectBrowser = false ) { Selection . objects = items . Select ( i => i . provider . toObject ( i , typeof ( UnityEngine . Object ) ) ) . Where ( o => o ) . ToArray ( ) ; if ( Selection . objects . Length == 0 ) return ; EditorApplication . delayCall += ( ) => { if ( focusProjectBrowser ) EditorWindow . FocusWindowIfItsOpen ( Utils . GetProjectBrowserWindowType ( ) ) ; EditorApplication . delayCall += ( ) => EditorGUIUtility . PingObject ( Selection . objects . LastOrDefault ( ) ) ; } ; }
Select and ping multiple objects in the Project Browser.
Select and ping multiple objects in the Project Browser .
items
IEnumerable<SearchItem>
Search Items to select and ping.
Search Items to select and ping .
focusProjectBrowser
bool
If true, will focus the project browser before pining the objects.
If true will focus the project browser before pining the objects .