[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Search.DisplayMode.html [Back]  [Original]

Unity - Scripting API: DisplayMode
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    DisplayMode

    enumeration

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Description

    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);
        }
    }
    

    Properties

    Property Description
    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.

    Web Proxy Viewer  |  New URL  |  Original Page