Version: 2021.1
Optimizando Scripts
Using Search

Unity Search

Use Search to search sources inside of Unity and perform actions on the results.

For example, from the Search window you can find Assets and open them, find Unity packages and install them, or find menu commands and run them.

The Search window

To launch Search use the Ctrl + K shortcut or the menu (Edit > Search All).

Note: You can customize the shortcut for Search in the Shortcuts Manager.

A Search field Enter your search query here.
For details about all the ways you can search Unity with Search, see Using Search.
B Saved Searches Access your saved searches.
To save your search query, use the Save icon to the right of the Search field.
C Results area Displays search results as you type the search query.
Items that best match the search query appear higher in the results. Search also learns over time, and prioritizes items that you select often. See Search Preferences to learn how to customize search result ordering.
D Search Provider Allows you to see all results from regular Search Providers (Project, Hierarchy, Menus, Settings) or choose results from one special Search Provider. Select More Options (:) to choose a special Search Provider.
E Preview Inspector Allows you to view and change item properties, open, reimport or delete a search item, or copy a path.

Search Providers

Each type of search has its own Search Provider. A Search Provider allows you to search and filter through content.

  • Regular Search Providers are opt-out. When you perform a regular search, Search uses all regular Search Providers, unless you exclude them.
  • Special Search Providers are opt-in. You must explicitly tell Search to perform a special search. You can only use one special Search Provider at a time.

You can also create your own Search Providers.

Each Search Provider has a unique search token. A search token is a text string that you can use in the search field to search using only a specific Search Provider.

Indexes

There are three index types:

  • Asset - An index of all Assets in a Project. This index is created automatically when you create a Project and rebuilds when you add or modify new content. The Asset index includes all Assets including Prefabs and scenes, but it doesn’t index the content of a scene or a nested hierarchy in a Prefab.
  • Prefab - An index containing only the GameObjects which are part of Prefabs.
  • Scene - An index of Assets in any scene.

To use Prefab and Scene indexes, you must create them in the Index Manager.

Getting help

You can get help with Search in the following ways:

  • When you first launch the Search window, the results area displays the basic keyboard shortcuts.



  • Type ? (question mark) in the search field to display a quick reference for different types of searches. See Getting Search help for more information.



  • Select the question mark icon at the top of the window to open the Search documentation.

Optimizando Scripts
Using Search
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961