Version: 2019.4
Editing Properties
Inspector Options

Swatch libraries

Use swatch libraries to reuse, save, and share colors, gradients, and animation curvesAllows you to add data to an imported clip so you can animate the timings of other items based on the state of an animator. For example, for a game set in icy conditions, you could use an extra animation curve to control the emission rate of a particle system to show the player’s condensing breath in the cold air. More info
See in Glossary
. You can save and choose swatches in the Color Picker, Gradient Editor, and Curve Editor.

Swatches section (red) in the Unity Color Picker
Swatches section (red) in the Unity Color Picker

A swatch library is a collection of swatches that you save in a file. The Swatches section displays a single library at a time.

To save a swatch:

  1. Open the Color Picker, Gradient Editor, or Curve Editor. For example, select Main Camera in the Hierarchy window.
  2. 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, click Background Color.
  3. In the picker window, adjust the color, gradient, or curve to your liking.
  4. In Swatches, click the outlined box.
  5. If the view is in List mode, optionally type a name for the swatch.
Example of saving a color while in the Grid view
Example of saving a color while in the Grid view

Drag and drop swatches to change their order. Right-click a swatch to move it to the top, replace it, rename it, or delete it. You can also delete a swatch by Alt/Option-clicking it.

Use the drop-down menu in Swatches to:

  • Choose List or Grid to change the view. The List view also displays the names of swatches.
  • Choose a swatch library.
  • Choose Create a Library to create a new swatch library and the location to save it in.
  • Choose Reveal Current Library Location to view the current library in Windows Explorer/Mac OS Finder.

By default, Unity saves swatch libraries in your user preferences. You can also save a swatch library in your Project. Unity saves Project swatch libraries in the Editor folder of the Assets folder. To share Project swatch libraries between users, or to include them in a package, add them to a revision control repository.

To edit a Project swatch library:

  1. Select the swatch library in the ProjectIn Unity, you use a project to design and develop a game. A project stores all of the files that are related to a game, such as the asset and Scene files. More info
    See in Glossary
  2. In the Inspector window, click Edit.

  • Preset libraries renamed to swatch libraries in 2018.1
Editing Properties
Inspector Options
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。