![]() Expand the dialog GameObject's hierarchy and disable the R_arm_2 child GameObject.Add the Sprite Library component to dialog gray GameObject, then assign the dialog gray.spriteLib Asset to its Sprite Library Asset property.Add the Sprite Library component to dialog GameObject, then assign the dialog.spriteLib Asset to its Sprite Library Asset property.Drag both dialog.psb and dialog gray.psb Prefabs from the Project window into the Scene.They are located in Assets/Samples/2D Animation//Samples/5 Sprite Swap/Sprite Library and are:įollow the steps below to reconstruct the sample Scene: Two Sprite Library Assets are created using the same steps demonstrated in the Flipbook Animation Swap sample. Both Assets are rigged with the same skeleton, and each Asset has two different Sprites for the hands which are swapped during the animation. These Assets are imported with the PSD Importer with its Character Rig property enabled. This sample uses 2 different source files located in Assets/Samples/2D Animation//Samples/5 SpriteSwap/Sprites. This sample builds on the reusable Animation Clip example from the Flipbook Animation Swap sample. Initial frame with the hands in thumbs-up position. Open the Scene file 2 Animated Swap.unityto see the sample in action. Note that the following example requires the PSD Importer installed. This sample demonstrates how to use Sprite Swap to create a reusable Animation Clip for animations that include both Sprite swapping and deformation of the Sprites. By using a different Sprite Library Asset for each GameObject, the same Animation Clip is reused with different Sprites. As the Animation Clip plays, the Sprite that each GameObject's Sprite Resolver refers to is swapped which creates the flipbook animation style. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |