docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Navigation & selection commands

    Commands to read and drive the Editor selection, and to run Unity Search queries. All commands are read-only or non-destructive and run on the main thread.

    get_selection

    Read the current Editor selection as structured object identities.

    No parameters.

    Returns: SelectionResult

    set_selection

    Set the Editor selection to the given assets/scene objects.

    Parameter Required Default Description
    instance_ids no – Scene/loaded object instance IDs to select.
    paths no – Asset paths to select (e.g. Assets/Foo.prefab).

    Returns: SelectionResult

    search

    Run a Unity Search query and return structured results.

    Parameter Required Default Description
    query yes – Unity Search query string, e.g. 't:Material', 'p: my asset', 'h: Main Camera'.
    limit no 50 Max results to return (capped 200).

    Returns: SearchResult

    See Creating commands and Connectivity.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)