Version: 2023.2
言語: 日本語

DisplayMode

enumeration

マニュアルに切り替える

説明

Options for setting the display mode to use for a search view.

using UnityEngine;
using UnityEditor;
using UnityEditor.Search;

static class Example_ISearchView_displayMode
{
    [MenuItem("Examples/ISearchView/displayMode")]
    public static void Run()
    {
        // SearchService can open a SearchView.
        var view = SearchService.ShowContextual("asset");

        // You can assign DisplayMode as iconSizeValue...
        view.itemIconSize = (float)DisplayMode.List;

        // ... and this will update displayMode
        Debug.Assert(view.displayMode == DisplayMode.List);
    }
}

変数

NoneUnspecified ISearchView display mode.
CompactDisplay as a compact list view.
ListDisplay as a list view.
GridDisplay as a grid of icons of various sizes.
TableDisplay search results in a table.