Version: 2022.3

描述

No specific search options. Result will be unsorted.

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Search;
using UnityEngine;

public class SearchFlags_None
{
    [MenuItem("Examples/SearchFlags/None")]
    public static void RequestAll()
    {
        SearchService.Request("t:Script", (SearchContext context, IList<SearchItem> items) =>
        {
            foreach (var item in items)
                Debug.Log(item);
        }, SearchFlags.None);
    }
}