This commit is contained in:
AbstractConcept 2022-12-09 11:40:08 -06:00
parent 0828ecd037
commit 2998865184
9821 changed files with 90 additions and 90 deletions

View file

@ -0,0 +1,245 @@
# Changelog
## [3.2.6] - 2020-11-05
### Fixed
- Added missing Animation and UIElements dependency
- Fixed slider offset in BoneInfluence window
- Added missing tooltips in the Sprite Skin inspector (case 1285255)
## [3.2.5] - 2020-08-31
### Fixed
- Fixed NullReferenceException when creating Preset for SpriteSkin component (case 1269921)
- Updated optional dependency support for Collections to 0.9.0-preview.6 and Burst 1.3.3 (case 1272877)
- Fixed warning message in console when installing 2D Animation sample
## [3.2.4] - 2020-07-23
### Fixed
- Fixed incorrect dependency on UnityEngine.XR.WSA.Input (case 1253085)
- Fixed Skinning Module flickers when adding new category (case 1247240)
## [3.2.3] - 2020-05-27
### Fixed
- Fixed exception when creating UXML Template asset with 2D Animation package installed.
## [3.2.2] - 2020-04-06
### Fixed
- Fixed bone name field in weight slider does not display bone name (case 1226249)
- Fixed SpriteResolver's Inspector not updated when GameObject is disabled
### Changed
- Improved deformation performance when Collection and Burst package is installed
### Added
- Allow reordering of bone order in Bone Influence window. This is to allow fine tuning of bone order when shown in SpriteSkin's Inspector
## [3.2.1] - 2020-03-20
### Fixed
- Fixed inconsistent line ending
## [3.2.0] - 2020-02-20
### Added
- Add alwaysUpdate option to SpriteSkin to determine if SpriteSkin execution should occur even when the associated SpriteRenderer is culled
- Added message to inform user on dependent packages when viewing certain sample Scenes
- Added API to access deformed vertices from SpriteSkin
### Changed
- Improved SpriteSkinEditor UI
- Adjust length of popup and value fields for Weight Slider Window
### Removed
- Remove Bounds Gizmo from SpriteSkin
- Remove Reset Bounds button from SpriteSkinEditor
### Fixed
- Fixed Sprite asset used by SpriteSkin in Scene is being deleted
- Fixed broken documentation links in inspectors
- Fixed Sprite deformation not updated when GameObject is being enabled
- Fixed exception after reverting from creating new vertices and edges
- Fixed visual defect after undoing changes to Bone Transform properties in SpriteSkin's Inspector
## [3.1.1] - 2020-01-20
###Fixed
- Fix 2D Animation not working when reloading scene in runtime (case 1211100)
###Added
- Bone visibility persist after apply
- Sprite visibility persist after apply
###Changed
- Deformed Sprite's bounds are now calculated and bounds property is removed from SpriteSkin's inspector (case 1208712)
- Changed default shortcut key for "Animation/Create Vertex" from "Shift-D" to "Shift-J"
- Changed default shortcut key for "Animation/Weight Brush" from "Shift-C" to "Shift-N"
## [3.1.0] - 2019-12-10
### Changed
- Changed how Samples are imported into the user's project
- Updated Third Party Notices file
### Fixed
- Fix Animation Samples crashes when installing on certain machines (case 1185787)
- Fix visual glitch when using SpriteSwap with Multi-threaded rendering (case 1203380)
- Fix bone name misaligned under Weight Slider Inspector when a name contains more than 26 letters (case 1200873)
- Fix bones not chained correctly when splitting bone in certain cases
- Fix 'Label' and 'Sprite' name overlaps with its input field when preset of "Sprite Library Asset" is created (case 1201061)
- Fix bone names can be empty (case 1200861)
- Fix bone gets created even though clicked on Visibility Panel (case 1200857)
- Fix NullReferenceException when using shortcut 'Shift+1' in certain cases (case 1200849)
### Added
- Expose SpriteSkin component to be accessible from scripts.
## [3.0.8] - 2019-11-06
### Changed
- Improve optional performance boost by installing Burst and Collections package. Currently tested with
- com.unity.collections 0.1.1-preview
- com.unity.burst 1.1.2
### Added
- Skinning Module now persists the following state after Apply or Revert is clicked in Sprite Editor Window
- Current view mode i.e. Character or Spritesheet Mode
- Sprite Selection
- Bone Selection
- Preview Pose
- Vertex Selection
- Visibililty Tool Active State
- Weight Brush Settings
## [3.0.7] - 2019-10-18
### Fixed
- Fix Search reset button is visible in Visibility tool when nothing is entered into the search field (case 1182627)
- Fix Sprite outline disappears when the Selected Outline Color alpha value is less than 255 (case 1186776)
- Fix button's label spelling error in 'Generate For All Visible' (case 1188621)
## [3.0.6] - 2019-09-18
### Changed
- Remove usage of Resource folder for assets needed by package.
### Fixed
- Fix GC allocation when using Sprite Resolver.
## [3.0.5] - 2019-09-06
### Added
- Optional performance boost by installing Burst package.
- Samples showing different how to produce different outcomes
### Changed
- Sprite and Group in Sprite Visibility Window appear in same order as original art source file
### Fixed
- Fix missing bone data in Sprite when importing with AssetDatabase V2
## [3.0.4] - 2019-08-09
### Added
- Add related test packages
- Added tangent deform for lighting support
### Fixed
- Fixed Amount slider not working in Weight Slider Panel
- Fixed exception when changing size to less than 0 in SpriteLibraryAssetInspector
- Fixed Sprite visual corruption when swapping Sprite using SpriteResolver
###Changed
- Make Size property field in Weight Brush draggable for changing brush size
- Rename SpriteLibraryAsset::GetCategorylabelNames to SpriteLibraryAsset::GetCategoryLabelNames
- Change string hash for Category and Label name. This might break existing animation usage with SpriteResolver.
- Add Experimental tag on Sprite Swap related features
## [3.0.3] - 2019-07-17
### Changed
- Update documentation
- Update to latest Mathematics package version
## [3.0.2] - 2019-07-13
### Changed
- Mark package to support Unity 2019.3.0a10 onwards.
## [3.0.1] - 2019-07-12
### Changed
- Fix path length due to validation failure.
## [3.0.0] - 2019-06-17
### Changed
- Remove preview tag.
- Remove experimental namespace
## [2.2.0-preview.3] - 2019-06-06
### Added
- BoneGizmos can be toggled in the SceneView Gizmos dropdown
- Scrollbar does not show for toolbar when required to scroll
- Change Sprite Library implementation.
- APIs redesigned. This will cause compilation errors if previous APIs are used
- Data serialization change. Previous Asset and Component data will not be compatible
## [2.2.0-preview.2] - 2019-05-10
### Added
- BoneGizmos will only show in selected hierarchies.
- Associate nearest Bone to Sprite intead of root Bone when no Bones are overlapping the Sprite
- Fixed Sprite not showing after it is being culled due to bone animation
- Add icons for Sprite Library Asset, Sprite Library Component and Sprite Resolver Component
- Fixed Sprite Library Asset Inspector Property Field text clipping
- SpriteResolver will assign Sprite to SpriteRenderer even it resolves to a missing Sprite
- Add visual feedback in SpriteResolver Inspector for missing Sprite
## [2.2.0-preview.1] - 2019-05-09
### Added
- Upgrade for 2019.2
- Copy and Paste rework
- Visibility Window remains open when switching between tools
- Reparent Bone tool removed and functionality moved into Bone Visibility Panel
- Added Sprite Library feature
- Add Layer Grouping support in Sprite Visibility Panel
## [2.1.0-preview.4] - 2019-04-29
### Added
- Fix skinning not in sync with the rendering.
## [2.1.0-preview.3] - 2019-04-24
### Added
- Set Burst compilation off for internal build
## [2.1.0-preview.2] - 2019-02-25
### Added
- Fix enable skinning on add SpriteSkin component
- Upgrade dependency package version for Unity 2019.1 support
- Fix case 1118093: SpriteSkin.onDrawGizmos() increases memory usage.
## [2.1.0-preview.1] - 2019-01-25
### Added
- Update package to work with 2019.1
- Improve animation runtime performance
- Fix bone reparenting sibling order
- Fix Sprite Visibility Tool in disabled state in certain cases
- Update documents
## [2.0.0-preview.1] - 2018-11-20
### Added
- Overhauled 2D Animation workflow.
- Refer to updated documentation for workflow changes.
- Single Sprite Editor Window module for 2D Sprite Rigging workflow
- Unified Bone, Geometry and Weight tools in a single window
- Supports Multiple Sprite Single Character rigging workflow through 2D PSD Importer Package.
- SpriteSkin now uses user define bounds for renderer culling
## [1.0.16-preview.2] - 2018-11-14
### Added
- Fix 2 Issues:
1. Prefabs with SpriteSkin loses references to bone hierarchy when Library folder is rebuilt/different.
2. The scene viewport shows the character without any bones applied, needing an re-import.
## [1.0.16-preview.1] - 2018-07-18
### Added
- Fix error log about VertexAttribute
## [1.0.16-preview] - 2018-06-20
### Added
- Fix Documentation warnings
- Fix error log complaining about DidReloadScripts signature.
- Fix issues with generate outline
## [1.0.15-preview] - 2018-04-12
### Added
- New Version suffix (preview)
- Improved Scene View gizmos for better manipulation of bone rotation and position
- Added notification when Sprites are imported with incorrect weights
- Fixed bug where textures with max texture size could not generate geometry

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 29c81981f22b24a2c8585a80ec3ee610
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,24 @@
# Sprite Swap and 2D Animation Integration
__Sprite Swap__ is integrated with the 2D Animation workflow. You must install the following packages or newer to use Sprite Swap:
- [2D Animation version 2.2.0-preview.1](https://docs.unity3d.com/Packages/com.unity.2d.animation@latest/index.html?preview=1)
- [PSDImporter version 1.2.0-preview.1](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest/index.html?preview=1)
To ensure Sprite Swap works correctly with skeletal animation, the animation rig needs to be identical between the interchangeable Sprites. Use the [Copy and Paste](CopyPasteSkele.md) tools to duplicate the rig from one Sprite to the other Sprite(s) to ensure they can be swapped.
## Asset Generation Behaviour
The following is the steps that Unity takes to generate the various Sprite Swap components.
1. When you import a PSB file with the [PSD Importer](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest/index.html?preview=1), Unity generates a Prefab and creates a [Sprite Library Asset](SLAsset.md) as a sub-Asset of this Prefab.
2. Unity then generates a GameObject for each Sprite in the Prefab that does not belong to a __Category__, or is the first Label in the Category.
3. Unity attaches the [Sprite Resolver component](SRComponent.md) to all Sprite GameObjects that belong to a Category.
4. Unity then attaches the [Sprite Library component](SLComponent.md) to the root GameObject, and the component is set to reference the Sprite Library Asset created in Step 1.
## Sprite Swap and Skeletal Animation Limitations
To ensure Sprite Swap works correctly with skeletal animation, the animation skeleton rig needs to be identical between corresponding Sprites that are to be swapped. Use the [Copy and Paste](CopyPasteSkele.md) feature to copy both the bones and Mesh data from one Sprite(s) to the other corresponding Sprite(s).

View file

@ -0,0 +1,25 @@
# Changing Parts of a Character
You can use __Sprite Swap__ to quickly change only one Sprite on the character Prefab without affecting the other Sprites. This means you can alter part of a characters appearance (for example, change a scarf to a different color) while the rest of the character remains the same.
In the following example, we have two Sprites that are variations of the characters scarf - one green and one blue. This workflow demonstrates how to switch from one to the other in the same Prefab.
![](images/bothscarves.PNG)<br/>__Left:__ The original green scarf. __Right:__ An alternate blue scarf.
1. Place the Sprites for both scarves into the same Sprite Library Asset, and add them both to the same Category named Scarf. You can do this directly in the Skinning Editor via the Sprite tab in the [Sprite Visibility panel](SpriteVis.md).
2. Give each of the Sprites a unique __Label__.
![](images/image_11.png)
3. In the __Scene__, select the character Prefab and then select the Scarf GameObject the Hierarchy window.
4. Go to the [Sprite Resolver component](SLAsset.html#sprite-resolver-component) of the Scarf GameObject. The __Sprite Resolver__s visual selector displays the two Sprites available in the Scarf __Category__.
![](images/image_13.png)
5. Select the blue scarf to switch the Sprite rendered by the Scarf GameObject to it instead.
![](images/image_14.png)<br/>Sprite Resolvers Label set to blue scarf.

View file

@ -0,0 +1,41 @@
# Character skinning and weighting workflow
The following steps are the general workflow you can use to prepare your character for animation with the Skinning Editor. The steps detail how to create the bones, generate the meshes, and adjust the weights for your character.
1. Use the [Create Bone](SkinEdToolsShortcuts.html#bone-tools) tool to build the bones of the character skeleton:
- With the tool selected, click to define the start-point of the bone. Then move the cursor to where the bone should end, and click again to set the bones end-point.
- After creating a bone, the tool allows you to set the end-point of the second bone and so on, in order to create a chain of bones.
- To continue a chain of bones from any bone, select the __Create Bone__ tool and click an existing bone, then click its end-point. A new bone is started from the end-point, creating a chain.
- Alternatively, you can set the start-point of the new bone away from its parent bone. The child bone still belongs to the same chain and this is reflected in the [bone hierarchy](SpriteVis.html#bone-tab-and-hierarchy-tree).
![](images/BoneChain.png)<br/>A faded link shows the red and blue bones are connected in a chain.
1. After creating the bones of the character, generate the geometry Mesh for the __Sprites__. It is recommended to use the [Auto Geometry](SkinEdToolsShortcuts.html#geometry-tools) tool to auto-generate the geometry Mesh.
- With the __Auto Geometry__ tool selected, select a Sprite and then select the __Generate For Selected button__ to generate a Mesh for that Sprite only. To __Generate For All Visible Sprites__, click the generate button without selecting any Sprite.
1. Refine the generated Meshes further by using the [Edit Geometry](SkinEdToolsShortcuts.html#geometry-tools) Geometry tool, or create your own Mesh outline with the [Create Vertex](SkinEdToolsShortcuts.html#geometry-tools) and [Create Edge](SkinEdToolsShortcuts.html#geometry-tools) Geometry tools.
1. [Paint weights](SkinEdToolsShortcuts.html#weight-tools) onto the Sprite geometry to adjust how much influence a bone has on the vertices of the Mesh. This affects how the mesh deforms when the character is animated. It is recommended to use the [Auto Weights](SkinEdToolsShortcuts.html#weight-tools) tool to auto-generate the weights. The __Auto Weights__ tool only generates weights for Sprites that have both a geometry Mesh, and bones intersecting their Mesh:
- The __Generate For All Visible__ button is available when you do not select any specific Sprite. Select it to generate weights for all valid Sprite Meshes in the editor.
- The __Generate For Selected__ button is available when you have a Sprite selected in the editor. Select it to generate weights for only the selected Sprite.
1. Use the [Weight Slider](SkinEdToolsShortcuts.html#weight-slider) and [Weight Brush](SkinEdToolsShortcuts.html#weight-brush) tools to further adjust the weights of the Mesh vertices.
1. To edit which bones influence a Sprite, select it and then go to the [Bone Influence](SkinEdToolsShortcuts.html#bone-influence) tool. A list of bones currently influencing the Sprites Mesh are listed in this panel at the bottom-right of the editor.
- To remove a bone, select it from the list and select __Remove (-)__ at the bottom right of the list.
![](images/BoneInf_panel.png)<br/>Select __Remove (-)__ at the bottom right of the panel.
- To add a bone as an influencer to the currently selected Sprite Mesh, select the bone in the editor window and select __Add (+)__ to add it to the list.
1. Test your rigged character by posing it with the [Preview Pose](SkinEdToolsShortcuts.html#preview-pose) tool. Move and rotate the different bones to check that the geometry Mesh deforms properly. Previewing poses can also be done while the following tools are selected: the __Weight Brush__, __Weight Slider__, __Bone Influence__, __Auto Weights__, and __Visibility__ tools.
- To restore a rigged character to its original pose, select __Reset Pose__ from the [Editor toolbar](SkinEdToolsShortcuts.html#editor-toolbar).
- Edit the default pose by moving the character bones and joints with the [Edit Bone](SkinEdToolsShortcuts.html#editor-toolbar) tool.

View file

@ -0,0 +1,35 @@
# Animating the character
To begin animating, drag the imported character Prefab into the Scene view. Unity generates a GameObject for each Sprite in the Prefab and [different Assets and components](SLAsset.md). With the new GameObject in the Scene, you can begin animating it with the [Unity animation workflow and tools](https://docs.unity3d.com/Manual/AnimationSection.html).
After you have [setup the animation skeleton and bone weights](CharacterRig.md) for your character, you can reuse the same rigged skeleton with other character Prefabs by using the [Copy](SkinEdToolsShortcuts.html#editor-toolbar) and [Paste](SkinEdToolsShortcuts.html#editor-toolbar) options on the [editor toolbar](SkinEdToolsShortcuts.html#editor-toolbar). This is useful if you need to quickly create characters that share the same build and animations.
This can only be done if the source and destination Prefabs have the same number of Sprites. The following functions then occur when you __Paste__ the __Copy__ data:
1. Copied bone data is pasted to the destination.
2. Mesh, weights, and bone association of source Sprite(s) are pasted to destination Sprite(s) with the same names.
## Copy
To copy a Sprite's data, select a Sprite and then select the __Copy__ button to copy the Mesh and bone data associated with that Sprite. If no Sprite is selected, the data of all the Sprites' currently in the [Skinning Editor](SkinningEditor.md) window is copied.
## Paste
To paste Sprite data to another Sprite, select the Sprite that should receive the paste data and then select __Paste__. This will bring up the Paste panel at the bottom right of the editor window:
![](images/PasteDialog.png)<br/>Paste dialog box.
| __Option__ | Function |
| ---------- | --------------------------------------------- |
| __Bones__ | Paste bone data. |
| __Mesh__ | Paste Mesh data. |
| __Flip X__ | Paste the data but mirrored along the X-axis. |
| __Flip Y__ | Paste the data but mirrored along the Y-axis. |
The __Copy__ and __Paste__ tools behave in the following ways depending on these factors:
| | Copy from a selected Sprite | Copy with no Sprite selected |
| --------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| __Paste with a Sprite selected__ | Data from the source Sprite will be copied to the selected destination Sprite. | Data is pasted to all Sprites at the destination with the same name(s) as the respective source Sprites. |
| __Paste with no Sprite selected__ | No data is pasted. | Data is pasted to all Sprites at the destination with the same name(s) as the respective source Sprites. |

View file

@ -0,0 +1,7 @@
# Usage examples
The Sprite Swap feature opens up several unique ways you can implement for your project. The following are examples of three common ways you can use Sprite Swap:
* [To create a frame-by-frame animation](FFanimation.md)
* [Changing selected parts of a character](CharacterParts.md) instead of the entire character
* [Swapping the entire Sprite Library Asset](SLASwap.md)

View file

@ -0,0 +1,23 @@
# Frame-by-frame animation
By using [Sprite Swap](SpriteSwapIntro.md), you can create frame-by-frame style animations by swapping to different Sprites on each frame at runtime. This is useful for simple animations, such as to show a character blinking. It is recommended that you first [change the keyframe tangent](#change-the-keyframe-tangent) before continuing with the workflow below:
1. In your character Prefabs __Sprite Library Asset__ (which can be automatically or [manually created](SSManual.md)), add a new __Category__. Add the Sprite for each frame of your animation to this Category, and give them each a unique __Label__ name.
2. Select your character Prefab and drag it into the Scene view.
3. Open the [Animation](https://docs.unity3d.com/Manual/AnimationOverview.html) window, and select your character Prefab. Then select the __Add Property__ button, and select the [Sprite Resolver component](SRComponent.md)s __Label__ property.
![](images/2DAnim_SpriteSwap_property.png)
4. Change the __Label__ property at each keyframe in the Animation window in the order they should appear for your animation. This simulates a frame-by-frame animation style.
## Change the Keyframe Tangent
When animating with the Category and Label value of the Sprite Resolver in the Animation window, it is important to change the keyframes tangent in the Animation window to __Constant__.
![](images/SpriteResolverCheck.png)
This is because the Sprite Resolver component uses the defined string hash value to locate the desired Sprite. If the values between keyframes are interpolated, the Sprite Resolver will not be able to resolve and render the correct Sprite.

View file

@ -0,0 +1,28 @@
# Preparing and importing artwork
To animate a character with the __2D Animation__ package, it is recommended to separate the individual parts of your character onto different [Layers](https://helpx.adobe.com/photoshop/using/layer-basics.html) in Photoshop (see Example 1). The [PSD Importer](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest) imports the graphic data from each Photoshop Layer as Sprites, and automatically arranges the Sprites into both a Sprite Sheet, and a Prefab with the Sprites in the Layers original positions (see Example 2).
![](images/2DAnimationV2_PSDLayers.png)<br/>Example 1: Layered character artwork in Adobe Photoshop.
![](images/2DAnimationV2_Mosaic_Prefab.png)<br/>Example 2: The different parts/Layers of the character arranged into a Sprite Sheet.
## Photoshop file and PSD Importer settings
It is recommended to prepare your character artwork by separating the characters various limbs or accessories into separate [layers](https://helpx.adobe.com/photoshop/using/layer-basics.html), and arranged into its default pose.
1. Save your artwork as a .psb file in Adobe Photoshop by selecting the __Large Document Format__ under the __Save As__ menu. You can convert an existing .psd file to .psb in the same way.
2. [Import](https://docs.unity3d.com/Manual/ImportingAssets.html) the .psb file into Unity with the [PSD Importer](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest/), which generates a Prefab containing Sprites based on the layers of the source file.
3. Select the generated character Prefab and go to its Inspector window. In the Inspector window, ensure the following settings are set:
* Set Texture Type to __Sprite(2D and UI)__.
* Set Sprite Mode to __Multiple__.
* Check the __Mosaic__ checkbox.
* Check the __Character Rig__ checkbox.
* Check the __Use Layer Grouping__ checkbox if you want to preserve any Layer Groups in the source .psb file.
![](images/ImporterWindow.png)<br/>Importer window settings
Click __Apply__ to apply the settings. Refer to the [PSD Importer](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest) documentation for more details about specific importer settings.

View file

@ -0,0 +1,29 @@
# Swapping Sprite Library Assets
If swapping each Sprite individually takes too much effort, you can instead swap the entire __Sprite Library Asset__ to another one containing alternate Sprites.
The following example shows how to switch from a Sprite Library Asset of color Sprites to another one containing identical Sprites but in grayscale:
![](images/bothsprites.PNG)<br/>__Left:__ Prefab with the colored Sprite Library Asset. __Right:__ Prefab with the grayscale Sprite Library Asset.
1. Create variants of your character artwork. In this example, a grayscale variant of the original artwork was created in Photoshop (or any other compatible image editor).
2. [Import](PreparingArtwork.md) both .psb files into the Unity Editor. Both become separate Prefabs in the Asset window.
3. Select the color Prefab and open it in the [Skinning Editor](SkinningEditor.md). Assign each Sprite of the character to a unique [Category](SpriteVis.html#how-to-create-a-category). It is suggested to name each __Category__ and __Label__ after the respective body part of the character. Apply the changes once you are ready, and exit the __Sprite Editor__.
![](images/image_15.png)<br/>The Category and Label names for the color Prefab.
4. Select the grayscale Prefab, and give its corresponding Sprites the same __Category__ and __Label__ names as the color Prefab.
![](images/image_16.png)<br/>Give the same Category and Label names to the grayscale Prefab.
5. Drag the color Prefab into the Scene view, and go to the root GameObject. The [Sprite Library component](SLAsset.html#sprite-library-component) is attached to the root GameObject and refers to the default __Sprite Library Asset__ that [Unity automatically generated](SpriteSwapIntro.html#how-unity-generates-sprite-swap-assets-and-components).
![](images/image_17.png)<br/>The color Sprite Library Asset.
6. With the Inspector window the color Prefab remaining open, go to the Asset window and expand the grayscale Prefab. Find the grayscale Prefab __Sprite Library Asset__ and drag it to the color Prefabs __Sprite Library Asset__ box, which replaces the color Prefabs original Sprite Library Asset.
7. The Sprites of the color Prefab should have switched to their grayscale counterparts of the grayscale Sprite Library Asset.
![](images/image_18.png)<br/>The grayscale version of the color Sprite Library Asset.

View file

@ -0,0 +1,44 @@
## Sprite Library Asset
The __Sprite Library Asset__ contains the __Categories__ and __Labels__ that a character Prefab refers to to determine what Sprites are rendered. This allows you to group similar or interchangeable Sprites together that can be used for [Sprite Swapping](SpriteSwapIntro.md).
Unity automatically generates a Sprite Library Asset as a sub-Asset of the Prefab when you create any [Categories or Labels](SpriteVis.html#sprite-tab) while editing the character Prefab. To [manually](SSManual.md) create a __Sprite Library Asset__, go to __Assets__ > __Create__ > __Sprite Library Asset__.
![](images/image_0.png)<br/>Inspector view of Sprite Library Asset
Select __Add (+)__ at the bottom-right of the __Sprite Library Asset__ to add a new __Category__. Select __Remove (-)__ to remove a Category instead.
| Property | Function |
| ---------------------------------- | ------------------------------------------------------------ |
| __Category Name__ | Enter a Category name. Category names must be unique. |
| __Category List__ | Use these settings to define the number of Sprites you want to include, and the label for each Sprite. |
| &nbsp;&nbsp;&nbsp;&nbsp;__Size__ | Enter the number of Labels you want to assign to this Category. |
| &nbsp;&nbsp;&nbsp;&nbsp;__Label__ | Enter a name for the registered Sprite. This Label must be unique from other Labels in the same Category. |
| &nbsp;&nbsp;&nbsp;&nbsp;__Sprite__ | Select or drag a Sprite onto this box to register it as the Sprite reference for this Label. |
## Sprite Library component
The __Sprite Library component__ is attached to the root GameObject of the character Prefab. Assign your preferred [Sprite Library Asset](SLAsset.md) to the __Sprite Library Asset__ box that the [Sprite Renderers](https://docs.unity3d.com/Manual/class-SpriteRenderer.) of the GameObjects within the Prefab will refer to and render respectively.
![](images/image_1.png)<br/>Inspector view of Sprite Component
| Property | Function |
| ------------------------ | ------------------------------------------------------------ |
| __Sprite Library Asset__ | Set this to the Sprite Library Asset you want to use for this charcter Prefab. |
## Sprite Resolver component
The __Sprite Resolver component__ is attached to each GameObject in the Prefab. The component pulls information from the [Sprite Library Asset](SLAsset.md) (assigned to the [Sprite Library component](SLComponent.md) at the root of the Prefab). The component contains two properties - [Category and Label](SpriteVis.html#sprite-tab) - and a visual Variant Selector that displays thumbnails of the Sprites contained in the Sprite Library Asset.
![](images/image_2.png)<br/>Inspector view of Sprite Resolver Component, with the variant visual selector.
| Property | Function |
| ------------ | ------------------------------------------------------------ |
| __Category__ | Select which Category you want to use a Sprite from for this GameObject. |
| __Label__ | Select the Label of the Sprite you want to use for this GameObject. |
Select the Sprite you want the __Sprite Renderer__ to render by selecting from the __Category__ and __Label__ dropdown menus, or select the Sprite directly in the visual Variant Selector.
## Sprite Skin component
When the character Prefab is brought into the Scene view, the PSD Importer automatically adds the __Sprite Skin__ component to any Sprite that have any [bone influences](SkinEdToolsShortcuts.md#bone-influences).

View file

@ -0,0 +1,9 @@
# Sprite Library component
Use the __Sprite Library__ component to connect the [Sprite Library Asset](SLAsset.md) to a GameObject. This allows you to access all of the Sprites within the __Sprite Library Asset__ and display them on the [Sprite Renderer](https://docs.unity3d.com/Manual/class-SpriteRenderer.) of the GameObject.
![Inspector view of Sprit Component](images/image_1.png)
| Property | Function |
| ------------------------ | ------------------------------------------------------------ |
| __Sprite Library Asset__ | Set this to the Sprite Library Asset you want to use on this GameObject. |

View file

@ -0,0 +1,14 @@
# Sprite Resolver component
The __Sprite Resolver__ component pulls information from the [Sprite Library Asset](SLAsset.md) set in the [Sprite Library component](SLComponent.md) on the same GameObject. It automatically applies the selected Sprite to the [Sprite Renderer](https://docs.unity3d.com/Manual/class-SpriteRenderer.html). This allows you to swap the Sprite Renderers Sprite to other ones in the Sprite Library Asset during run time.
The component contains two properties - __Category__ and __Label__ - as well as a visual Variant Selector that displays thumbnails of the Sprites contained in the Sprite Library Asset.
![Inspector view of Sprite Resolver Component, with visual selector.](images/image_2.png)
| Property | Function |
| ------------ | ------------------------------------------------------------ |
| __Category__ | Select which Category you want to use a Sprite from for this GameObject. |
| __Label__ | Select the Label of the Sprite you want to use for this GameObject. |
You can select the Sprite by setting to the component to its __Category__ and __Label__, or select the Sprite directly with the visual Variant Selector. When either of the Sprite Resolvers properties change, the Sprite Resolver component checks the hierarchy for a Sprite Library component on the same GameObject. Once it finds the Sprite Library component, the Sprite Resolver requests the Sprite with the matching __Category__ and __Label__ values.

View file

@ -0,0 +1,47 @@
# Sprite Swap manual setup
When a [Category or Label](SpriteVis.html#how-to-create-a-category) is created from the [Sprite Visibility panel](SpriteVis.md) in the __Skinning Editor__, Unity automatically [generates](SpriteSwapIntro.html#how-unity-generates-sprite-swap-assets-and-components) a __Sprite Library Asset__ as a sub-Asset of the [character Prefab](PreparingArtwork.md) that contains the Categories and Labels created for that Prefab.
You can create a __Sprite Library Asset__ manually and choose which GameObject refers to it, by following the steps below:
1. Select the __Sprite Library Asset__ from the Asset creation menu by going to: __Asset > Create > Sprite Library Asset__.
![](images/image_7.png)
2. Select the new Sprite Library Asset and go to its Inspector window. The list of Categories and Labels available in the Asset is displayed.
![](images/image_8.png)
3. Select __Add (+)__ at the bottom-right of the List to add a new __Category__. Enter a name into the New Category box. Each Category in the same [Sprite Library Asset](SLAsset.md) must have a name unique from others.
![](images/image_9.png)
4. Next, create an empty GameObject (menu: __Right-click on the Hierarchy window > Create Empty__). Select it and then add the [Sprite Renderer](https://docs.unity3d.com/Manual/class-SpriteRenderer.html) component to it.
![](images/AddSpriteRenderer.png)
5. Add the [Sprite Library component](SLAsset.html#sprite-library-component) to the same GameObject. Assign the Sprite Library Asset created in step 3 to the __Sprite Library Asset__ box.
![](images/SpriteLibraryComponent.png)
6. Add the [Sprite Resolver component](SLAsset.html#sprite-resolver-component) to the same GameObject.
![](images/image_10.png)
Open the **Category** drop-down menu, and select a Category you created in step 3. The component will then display a **Label** drop-down menu and a Visual Variant Selector that displays thumbnails of the different Sprites available in the Category.
![](images/SpriteResolver_VisualSelector.png)
7. When you select a Sprite in the __Sprite Resolver__ component, Unity automatically replaces the current Sprite in the[ Sprite Renderer](https://docs.unity3d.com/Manual/class-SpriteRenderer.html) component with the one you have selected.

View file

@ -0,0 +1,159 @@
# Editor tools and shortcuts
![](images/LabelledEditorTools.png)<br/>Labelled 2D Animation Skinning editor tools
The Skinning Editor tools are split-up into the following groups:
A. [Editor toolbar](#editor-toolbar)
B. [Bone tools](#bone-tools)
C. [Geometry tools](#geometry-tools)
D. [Weight tools](#weight-tools)
## Editor toolbar
This is toolbar that contains the options that affect what is overall visible in the __Skinning Editor__ window, as well as the __Copy__ and __Paste__ functions.
| __Tool__ | __Default Shortcut__ | __Function__ |
| ------------------------------------------------------------ | -------------------- | ------------------------------------------------------------ |
| ![Reset Pose](images/icon_RestoreBind.png)<br/>__Reset Pose__ | Shift + 1 | Restore a characters bones and joints to their original positions. |
| ![Toggle View Mode](images\icon_ToggleView.png)<br/>__Toggle View Mode__ | Shift + 2 | Switch between the __Character__ and __Sprite Sheet__ view modes. |
| ![Copy](images\icon_Copy.png)<br/>__Copy__ | Ctrl + C | Copies the bone and mesh data from the current selection. |
| ![Paste](images\icon_Paste.png)<br/>__Paste__ | Ctrl + V | Pastes the copied bone and mesh data to the current selection. |
| ![Paste](images\icon_Paste.png)<br/>__Paste__ | Shift + B | Use this shortcut to show additional pasting options. |
| ![Visibility eyecon](images\icon_Visibility.png)<br/>__Visibility__ | Shift + P | Toggles the [Sprite visibility panel](SpriteVis.md), which controls the visibility of the Sprite Meshes and bones in the editor window. |
| __Toggle Tool Text__ | Shift + ` | Show or hide text on tool buttons. |
## Bone tools
Use the __Bone Tools__ to create and edit the bones of your character and their hierarchy.
| __Tool__ | __Default Shortcut__ | __Function__ |
| ------------------------------------------------------------ | -------------------- | ------------------------------------------------------------ |
| ![Preview Pose](images/icon_PreviewPose.png)<br/>__Preview Pose__ | Shift + Q | Preview character poses after rigging. |
| ![Edit Bone](images/icon_EditJoints.png)<br/>__Edit Bone__ | Shift + W | Reposition the bones into a new position. These changes are automatically saved as the default bind pose for the Restore Bind Pose tool.Sprite geometry does not deform with the bones in this mode, even if the bones are attached as influencers. |
| ![Create Bone](images/icon_CreateBone.png)<br/>__Create Bone__ | Shift + E | Click and drag to create bones. |
| ![Split Bone](images/icon_SplitBone.png)<br/>__Split Bone__ | Shift + R | Splits the selected bone. |
### Bone panel
The __Bone panel__ appears at the bottom right of the editor window when you have a bone selected.
![](images/bone_panel.png)
| Property | Function |
| --------- | ------------------------------------------------------------ |
| __Name__ | Displays the name of the selected bone. Enter a new name here to rename the selected bone. |
| __Depth__ | Displays the Depth value of the selected bone that determines its render order, or enter a new value (which can be negative) to change the render order. See the [bone tab and hierarchy tree](SpriteVis.html#bone-tab-and-hierarchy-tree) page for more information about how the Depth value affect the way the Sprite Mesh is rendered and deformed. |
## Geometry tools
Use the __Geometry tools__ to generate and edit the meshes of the different Sprites that make up your character.
| __Tool__ | __Default Shortcut__ | __Function__ |
| ------------------------------------------------------------ | -------------------- | ------------------------------------------------------------ |
| ![Auto Geometry](images/icon_GenGeo.png)<br/>__Auto Geometry__ | Shift + A | Select to auto-generate Meshes for Sprites. When this tool is selected, the [Geometry panel](#geometry-panel) becomes available at the bottom-right of the __Skinning Editor__. |
| ![Edit Geometry](images\icon_EditGeo.png)<br/>__Edit Geometry__ | Shift + S | Edit generated Meshes by repositioning vertices. |
| ![Create Vertex](images/icon_CreateVertex.png)<br/>__Create Vertex__ | Shift + D | Create new vertices to create geometry. |
| ![Create Edge](images/icon_CreateEdge.png)<br/>__Create Edge__ | Shift + G | Create new edges to create geometry. |
| ![Split Edge](images/icon_SplitEdge.png)<br/>__Split Edge__ | Shift + H | Split an existing edge into two. |
### Geometry panel
The __Geometry panel__ is only visible when __Auto Geometry__ is enabled. It contains the available settings that affect how the geometry of selected Sprites are generated.
![](images/GeoPanel.png)<br/>Visible only when Auto Geometry is enabled.
| __Property__ | __Function__ |
| -------------------------------------------------- | ------------------------------------------------------------ |
| __Outline Detail__ | Use the slider to adjust the accuracy of the generated geometrys outline to the outline of the Sprite. Smaller values create simpler outlines, while larger values create denser outlines that fit to the Sprites outline more accurately. |
| __Alpha Tolerance__ | Use the slider to set the alpha value threshold to consider when generating geometry. Pixels with an alpha value lower than the set tolerance value are considered transparent during outline detection when the geometry is generated. |
| __Subdivide__ | Use the slider to adjust the tessellation of the Sprite Mesh by adding or decreasing the number of vertices inside the generated Mesh. |
| __Weights__ | Enable to automatically assign weights between the generated geometry Mesh and nearby bones. |
| __Generate For Selected/Generate For All Visible__ | Select this button to generate a geometry Mesh for selected Sprites based on the property settings above. To generate geometry for all Sprites in the Skinning Editor, do not have any Sprite selected when you select this button. |
## Weight tools
Vertices in the generated geometry meshes are influenced by different bones which affect how the meshes deform during animation. The percentage of influences from different bones for each vertex is contained in the weight information assigned to that vertex, which you can control with the following weight tools.
To add weights to your Sprites, you can first ensure that there are [bones](#bone-tools) overlaying the Sprites and [geometry](#geometry-tools) has been generated.
| __Tool__ | __Default Shortcut__ | __Function__ |
| ------------------------------------------------------------ | -------------------- | ------------------------------------------------------------ |
| ![Auto Weights](images/icon_GenWeights.png)<br/>__Auto Weights__ | Shift + Z | Auto-generate weights between the geometry and bones. When this tool is selected, the [Weights panel](#weights-panel) becomes available at the bottom-right of the __Skinning Editor__ that displays the available settings and the option to generate weights for |
| ![Weight Slider](images/icon_WeightSlider.png)<br/>__Weight Slider__ | Shift + X | Use the slider to adjust weights. |
| ![Weight Brush](images/icon_WeightPaint.png)<br/>__Weight Brush__ | Shift + N | Adjust weights by painting with a brush. |
| ![Bone Influence](images/icon_BoneInfluence.png)<br/>__Bone Influence__ | Shift + V | Select which bones influence a Sprite. |
### Weights panel
![](images/Weights_panel.png)
The weights panel appears at the lower-right of the Sprite Editor window when __Auto Weights__ is selected.
| __Property__ | __Function__ |
| ------------------------- | ------------------------------------------------------------ |
| __Associate Bones__ | Select this box to automatically associate bones to the Sprite geometry they overlay. |
| __Generate/Generate All__ | Select this button to generate weights for the currently selected Sprite, or for all Sprites if no Sprite is selected. This does not do anything if [geometry has not been generated](#geometry-tools) for the Sprites, or if no bones are associated with the Sprite geometry. |
| __Normalize__ | Normalizes the weights of the selected Sprite, or all Sprites if no specific Sprite is selected. |
| __Clear__ | Clear the weights of the selected Sprite, or of all Sprites if no specific Sprite is selected. |
### Weight Slider
![](images/WeightSlider.png)
| __Property__ | __Function__ |
| ------------------------------------------- | ------------------------------------------------------------ |
| __Mode__ | The current behavior of the __Weight Slider__ tool. |
| &nbsp;&nbsp;&nbsp;&nbsp;Add and Subtract | Use the slider to increase or decrease the selected bones (currently displayed in the __Bone__ property) influence on selected vertices. *Increasing in* |
| &nbsp;&nbsp;&nbsp;&nbsp;Grow and Shrink | Use the slider to increase or decrease the weight on vertices that are already influenced by the selected bone. |
| &nbsp;&nbsp;&nbsp;&nbsp;Smooth | Averages the weights of all vertices with their neighbors to create an even distribution of weight across all vertices. |
| __Bone__ (unavailable if __Mode > Smooth__) | Displays the currently selected bone. Use the drop-down menu to select a different bone, or select another bone |
| __Normalize__ | Select this to ensure the total normalized weight of all vertices of a selected Sprite mesh is equal to one. |
| __Amount__ | Amount of weight applied on selected vertices. |
| __Vertex Weight__ | Adjust the bone weights of selected vertices. |
### Weight Brush
![](images/WeightBrush.png)
| __Property__ | __Function__ |
| ---------------------------------------- | ------------------------------------------------------------ |
| __Mode__ | The current behavior mode of the weights tool. |
| &nbsp;&nbsp;&nbsp;&nbsp;Add and Subtract | Use the slider to increase or decrease the influence on vertices around the selected bone. |
| &nbsp;&nbsp;&nbsp;&nbsp;Grow and Shrink | Use the slider to increase or decrease the influence on vertices that are already affected by the selected bone. |
| &nbsp;&nbsp;&nbsp;&nbsp;Smooth | Averages the weights of vertices with their neighbors to create a smoother distribution of weights. |
| __Bone__ | The bone that the Brush is painting influence for. Select a different bone via the drop-down menu. |
| __Normalize__ | Enable to ensure the normalized weight of painted vertices will equal to 1. |
| __Size__ | Size of the weight brush cursor. |
| __Hardness__ | Amount of weight applied by the brush per brushstroke. Higher values increase the weight per brushstroke, up to the maximum of 100 where the full weight is applied at once. |
| __Step__ | Number of increments needed to apply the full weight of brush. |
### Bone Influences panel
The __Bone Influences panel__ displays a list of bones that are currently influencing the selected Sprite Mesh.
![](images/BoneInfluencesExample.png)
When the Skinning Editor is set to [Character mode](#editor-toolbar), the Bone Influences panel allows you to add a bone to the list which includes its influence in the deformation of the selected Sprites mesh, or remove a bone from the list which removes its influence instead.
To add a bone to the list, select the bone in the __Skinning Editor__ window and then select __Add (+__) at the bottom-right of the panel. To remove a bone from the list, select the bone in the list or in the editor window and then select __Remove (-)__.
#### Rearranging bone order
You can rearrange the bone order in the Bone Influences panel by selecting and the dragging the respective bone entries up or down the list.
![](images/BoneInfluences_order.png)
The order of the bones in the Bone Influences panel determines the order of the bones on the __Sprite Skin __component. This is especially important when replacing the Sprite for deformation in the __Sprite Renderer__, such as when using [Sprite Swap](SpriteSwapIntro.md), as you can ensure the bone order remains the same between the Sprites and that the correct Transform drives the correct deformation.
![](images/BoneInfluences_orderSpriteSkin.png)

View file

@ -0,0 +1,37 @@
# Skinning Editor
The __Skinning Editor__ is available as a module in the __Sprite Editor__ after you install the __2D Animation__ package. You can use the [available tools](SkinEdToolsShortcuts.md) in the Skinning Editor to create the [bones](SkinEdToolsShortcuts.html#bone-tools) of the animation skeleton, generate and edit the mesh [geometry](SkinEdToolsShortcuts.html#geometry-tools) of your character, and adjust the [weights](SkinEdToolsShortcuts.html#weight-tools) used to bind the bones to the Sprite meshes.
To open your imported character in the Skinning Editor:
1. Select the character [Prefab](https://docs.unity3d.com/Manual/Prefabs.html) created after importing your character with the PSD Importer.
2. Select the Prefab and go to its Inspector window. Select the __Sprite Editor__ button to open the Prefab in the Sprite Editor.
3. In the Sprite Editor, open the drop-down menu at the upper left of the editor window and select the __Skinning Editor__ module.
![](images/SelectSknEditor.png)
See the [Editor tools and shortcuts](SkinEdToolsShortcuts.md) page for more information about the different features and tools available in the Skinning Editor.
## How to select a Sprite in the editor
To select a Sprite in the Skinning Editor window:
1. Double-click a Sprite to select it in the editor window. An orange outline appears around the Sprite that is selected (you can change the outline color in [Tool Preferences](ToolPref.md).
2. If the Sprite you want to select is behind other Sprites, hover over where the Sprite is, and double-click to cycle through all Sprites at the cursor location until you reach the desired Sprite.
3. Double-click on a blank area in the editor window to deselect all Sprites.
## How to select bone or Mesh vertices in the editor
To select a bone or mesh vertices when using the [Bone](SkinEdToolsShortcuts.html#bone-tools) and [Geometry tools](SkinEdToolsShortcuts.html#geometry-tools):
1. Click a bone or mesh vertex to select it specifically.
2. Draw a selection rectangle over multiple bones or vertices to select them all at once.
3. Right click to deselect any selected bone or mesh vertices.

View file

@ -0,0 +1,40 @@
# Sprite Swap overview (Experimental Feature)
__Sprite Swap__ is an experimental feature that enables you to change a GameObjects rendered Sprite within the same character Prefab. This enables you to quickly and easily create multiple characters that look different while [reusing existing bone and Mesh data](CopyPasteSkele.md). You can also use Sprite Swap to switch the displayed Sprite on each frame at run time to create [frame-by-frame animation](FFanimation.md).
The workflow for implementing Sprite Swap differs if you are using the workflow that is [integrated with 2D Animation](#sprite-swap-and-2d-animation-integration), or if you are [manually setting up](SSManual.md) the Sprite Swap components.
## Sprite Swap Assets and components
The following Assets and components are part of the Sprite Swap process:
1. The [Sprite Library Asset](SLAsset.md) contains the [Categories and Labels](SpriteVis.html#sprite-tab) of the Sprites.
1. The [Sprite Library component](SLAsset.html#sprite-library-component) shows the currently referred to __Sprite Library Asset__.
1. The [Sprite Resolver component](SLAsset.html#sprite-resolver-component) is used to request a Sprite registered to the __Sprite Library Asset__ by referring to the __Category__ and __Label__ value of the desired Sprite.
## How Unity generates Sprite Swap Assets and components
Unity generates the various [Sprite Swap](SpriteSwapIntro.md) components in the following steps:
1. When you import a .psb file with the [PSD Importer](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest/index.html), Unity generates a Prefab containing a Sprite for each Layer in the source file.
2. If you create any [Categories or Labels](SpriteVis.html#sprite-tab) while editing the character Prefab, Unity automatically generates a [Sprite Library Asset](SLAsset.md) as a sub-Asset of the Prefab.
3. When the Prefab is brought into the Scene view, Unity generates a GameObject for each Sprite in the Prefab that does _not_ belong to a [Category](SpriteVis.html#sprite-tab). However if the Sprite is the first [Label](SpriteVis.html#sprite-tab) in a __Category__, then Unity will generate a GameObject for the Sprite as well.
4. If the Prefab has a __Sprite Library Asset__ sub-Asset, then Unity attaches the [Sprite Library component](SLAsset.html#sprite-library-component) to the root GameObject which is set to reference the __Sprite Library Asset__ created in step 1 by default.
5. Unity attaches the [Sprite Resolver component](SLAsset.html#sprite-resolver-component) to all __Sprite__ GameObjects that belong to a Category.
Refer to the respective component pages for more information on their functions and properties.
## Sprite Swap and 2D Animation integration
__Sprite Swap__ is integrated with the 2D Animation workflow. You must install the following packages or newer to use the Sprite Swap feature:
- [2D Animation version 2.2.0-preview.1](https://docs.unity3d.com/Packages/com.unity.2d.animation@latest/index.html)
- [PSDImporter version 1.2.0-preview.1](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@latest/index.html)
## Skeletal animation limitations
To ensure Sprite Swap works correctly with skeletal animation, the skeleton must be identical between the Sprites being swapped. Use the [Copy and Paste](CopyPasteSkele.md) tools to duplicate the skeleton rig from one Sprite to the other Sprite(s) to ensure they can be swapped smoothly.

View file

@ -0,0 +1,63 @@
# Sprite Visibility panel
Toggle the __Sprite Visibility__ panel by selecting the __Visibility tool__ button along the top right of the editor window:
![](images/Highlighted_Visibility_icon.png)
The panel appears on the right-side of the editor window. It has two sliders at the top that control the visibility of the ![](images/bone_icon.png)bones and ![](images/mesh_icon.png)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.
![](images/image_3.png)
The panel has two main tabs - __Bone__ and __Sprite__. The Bone tab displays the [Bone hierarchy](#bone-tab-and-hierarchy-tree) 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
![](images/bone_tree.PNG)<br/>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](SkinEdToolsShortcuts.html#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 ![](images/visibility_icon.png) icon next to it.
| Property | Function |
| ------------------------------- | ------------------------------------------------------------ |
| ![](images/visibility_icon.png) | 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. <br/>A bones Depth value is 0 by default. To set a bones Depth value, select one of the available [Bone tools](SkinEdToolsShortcuts.html#bone-tools) and then select one of the bones. Find the [Bone panel](SkinEdToolsShortcuts.html#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.
![](images/SpriteTab_order.png)
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](SLAsset.md) that is a sub-Asset of the character Prefab. Changing the Category and Labels of Sprites allows you to [Sprite Swap](SLASwap.md), which allows you to create [frame-by-frame animations](FFanimation.md) and [other uses](Examples.md).
## 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__.
![](images/image_4.png)
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.
![](images/image_5.png)
## 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.
![](images/image_6.png)
| 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. |

View file

@ -0,0 +1,21 @@
* [Introduction to 2D Animation](index.md)
* [Preparing and importing artwork](PreparingArtwork.md)
* [Skinning Editor](SkinningEditor.md)
* [Tool Preferences](ToolPref.md)
* [Editor tools and shortcuts](SkinEdToolsShortcuts.md)
* [Sprite Visiblity panel](SpriteVis.md)
* [Character skinning and weighting workflow](CharacterRig.md)
* [Animating your character](CopyPasteSkele.md)
* [Sprite Swap workflow - Experimental Feature](SpriteSwapIntro.md)
* [Sprite Library Asset and other components](SLAsset.md)
* [Sprite Swap manual setup](SSManual.md)
* [Usage examples](Examples.md)
* [Frame-by-frame animation](FFanimation.md)
* [Changing parts of a character](CharacterParts.md)
* [Swapping Sprite Library Assets](SLASwap.md)

View file

@ -0,0 +1,17 @@
## Tool Preferences
Adjust the appearance of the 2D Animation tools in the Skinning Editor by going to its Preferences menu: __Edit__ > __Preferences__ > __2D__ > __Animation__.
![](images/2DAnimationV2_ToolPreferences.png)<br/>Tool Preferences
| Setting | Function |
| -------------------------- | ------------------------------------------------------------ |
| __Hide Tool Text__ | Enable this option to hide the tool text to have a compact view. |
| __Selected Outline Color__ | Customize the outline color of selected Sprite and bone. |
| __Sprite Outline Size__ | Use the slider to adjust the outline thickness of a selected Sprite. |
| __Bone Outline Size__ | Use the slider to adjust the outline thickness of a selected bone. |
Enable __Hide Tool Text__ to have only the tool icons visible in the [Skinning Editor](SkinningEditor.md) window.
![](images/2DAnimationV2_compacted.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Some files were not shown because too many files have changed in this diff Show more