Sprite Swap Overview (Experimental Feature) | 2D Animation | 3.0.8
docs.unity3d.com
    Show / Hide Table of Contents

    Sprite Swap Overview (Experimental Feature)

    Sprite Swap is a feature that enables you to change a GameObject’s rendered Sprite, but keep the same skeleton rig and Animation Clips. This enables you to quickly and easily create multiple characters that look different, but have the same animation rigs. You can also use Sprite Swap to switch the displayed Sprite on each frame at run time, to create frame-by-frame animation.

    The workflow for implementing Sprite Swap differs if you are following the workflow integrated with 2D Animation, or if you are manually setting up your Sprites.

    Below is the general workflow for implementing Sprite Swapping:

    1. Create and set up a Sprite Library Asset.
    2. Attach a Sprite Library component and Sprite Resolver component to the GameObject you want to use Sprite Swapping on. This GameObject must also contain a Sprite Renderer component.

    The Sprite Library component contains the reference to a selected Sprite Library Asset, while the Sprite Resolver component is used to request a Sprite registered to that Sprite Library Asset by providing the Category and Label value of the desired Sprite.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023