PO/Library/PackageCache/com.unity.2d.animation@5.0.7/Documentation~/SpriteVis.md

4.8 KiB
Raw Blame History

Sprite Visibility panel

Toggle the Sprite Visibility panel by selecting the Visibility tool button along the top right of the editor window:

The panel appears on the right-side of the editor window. It has two sliders at the top that control the visibility of the bones and Sprite meshes within the editor window. Move either slider further to the left to decrease the visibility of the bones or meshes respectively, and to the right to increase their visibility.

The panel has two main tabs - Bone and Sprite. The Bone tab displays the Bone hierarchy of the character Prefab, and the Sprite tab displays the names of the Sprites, their grouping hierarchy, and Category and Label information.

Bone tab and hierarchy tree


The Bone tab selected.

Select the Bone tab to view the list of bones in the character Prefab. The list reflects the hierarchy of bones you created with the Bone tools. You can reparent and reorder bones directly from the bone tab by dragging selected bones up and down the list. Toggle the visibility of each bone by selecting the icon next to it.

Property Function
Toggle the visibility of each bone by selecting this icon next to the bone.
Bone The name of the Bone.
Depth The render order of bones that are influencing the same Sprite Mesh. The parts of the Mesh that is influenced by a bone with higher bone Depth value will overlay the parts influenced by bones with lower Depth value.
A bones Depth value is 0 by default. To set a bones Depth value, select one of the available Bone tools and then select one of the bones. Find the Bone panel at the bottom right of the window, and enter the desired value to its Depth property box.

Sprite tab

Select the Sprite tab to see the list of Sprites that make up the character Prefab in the Skinning editor window. The names and order of the Sprites mirror their names, layer and grouping order in the original source file.

The Sprite tab has two additional columns for the Category and Label of each Sprite in the character Prefab. A Category contains a selection of Sprites that are differentiated by their Labels, and this information is contained in the Sprite Library Asset that is a sub-Asset of the character Prefab. Changing the Category and Labels of Sprites allows you to Sprite Swap, which allows you to create frame-by-frame animations and other uses.

How to create a Category

  1. Go to the row of the Sprite, open the drop-down menu on the Category column and select New.

  2. Enter a name for the Category. This name must be unique among other Categories within the same Library Asset.

  3. When you enter a Category name, Unity automatically assigns that Sprite a Label based on the Sprites name, which you can edit. Labels belonging to the same Category must have unique names.

  4. To assign the Sprite to an existing Category, open the drop-down menu on the Category column along its roll, and select from the list of existing Categories.

Context menu options

There are context menu options available from the Visibility panel to create Categories and Labels based on the imported groups and layer names of the Sprites. Open the context menu by right-clicking the row of the Sprite or Group you want to convert to a Category.

Option Function
Convert Group to Category This option is only available if the selected row is a Group that contains multiple Sprites. Select this option to assign all Sprites in the group to a new Category. Unity automatically names the new Category with the root Group name.
Convert Layer to Category Select this option to assign the Sprite to a Category based on the Sprites name. Unity also uses the Sprite's name as the Label name.
Clear All Category Select this to remove all selected Sprites from their currently assigned Categories.