Singularity/Library/PackageCache/com.unity.2d.animation@7.0.10/Documentation~/CopyPasteSkele.md
2024-05-06 11:45:45 -07:00

2.9 KiB

Reusing Animations

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. With the new GameObject in the Scene, you can begin animating it with the Unity animation workflow and tools.

After you have setup the animation skeleton and bone weights for your character, you can reuse the same rigged skeleton with other character Prefabs by using the Copy and Paste options on the 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 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:


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.