Version: 2019.4
The Inspector window
Editing Properties

Assigning icons

Unity allows you to assign custom icons for GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
and scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
. These icons display in the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
view, along with built-in icons for items such as Lights and CamerasA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
. Use the Gizmos menu to control how icons are drawn in the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary
.

GameObject Select Icon button

To change the icon for a GameObject, select the GameObject in the Heirarchy window or Scene view, then click the Select Icon button (the blue cube, highlighted with a red square in the image below) in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary
window to the left of the GameObject’s name.

The GameObject Select Icon button (here highlighted with a red square) in the Inspector window
The GameObject Select Icon button (here highlighted with a red square) in the Inspector window

When you assign an icon to a GameObject, the icon displays in the Scene view over that GameObject (and any duplicates made afterwards). You can also assign the icon to a PrefabAn asset type that allows you to store a GameObject complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. More info
See in Glossary
to apply the icon to all instances of that Prefab in the Scene.

Script Select Icon button

To assign a custom icon to a script, select the script in the Project windowA window that shows the contents of your Assets folder (Project tab) More info
See in Glossary
, then click the Select Icon button (the C# file icon, highlighted with a red square in the image below) in the Inspector window to the left of the script’s name.

The Script Select Icon button (here highlighted with a red square) in the Inspector window
The Script Select Icon button (here highlighted with a red square) in the Inspector window

When you assign an icon to a script, the icon displays in the Scene view over any GameObject which has that script attached.

The Select Icon menu

Whether you are assigning an icon to a GameObject or a Script, the pop-up Select Icon menu is the same:

The Select Icon menu has built-in icons. Click on an icon to select it, or click Other… to select an image from your project Assets to use as the icon.

The built-in icons fall into two categories: label icons and image-only icons.

Label icons

Assign a label icon to a GameObject or script to display the name of the GameObject in the Scene view.

A GameObject with a label icon assigned
A GameObject with a label icon assigned

Image-only icons

Image-only icons do not show the GameObject’s name. These are useful for assigning to GameObjects that may not have a visual representation (for example, navigation waypoints). With an icon assigned, you can see and click on in it the Scene view to select and move an otherwise invisible GameObject.

A yellow diamond icon assigned to multiple invisible GameObjects
A yellow diamond icon assigned to multiple invisible GameObjects

Any Asset image in your project can also be used as an icon. For example, a skull and crossbones icon could be used to indicate danger areas in your level.

A red exclamation mark image has been assigned to a script. The icon is displayed over any GameObjects which have that script attached.
A red exclamation mark image has been assigned to a script. The icon is displayed over any GameObjects which have that script attached.

Note: When an Asset’s icon is changed, the Asset itself is marked as modified and therefore picked up by version controlA system for managing file changes. You can use Unity in conjunction with most common version control tools, including Perforce, Git, Mercurial and PlasticSCM. More info
See in Glossary
systems.

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