docs.unity3d.com
    Show / Hide Table of Contents

    Sprite Switch Clip

    The inspector of SpriteSwitchClip is used to override the sprites of SpriteRenderer components in the Selection Groups bound to the track.


    Operations

    1. Create a selection group

    The selection group must contain some gameobjects which have a sprite renderer component.

    The sprite renderer has a sprite property which cannot be changed using the material-switch-clip, so a sprite-switch track is provided specifically for this purpose.

    2. Create a sprite switch track

    Using timeline, create a sprite switch clip track, then add a sprite switch clip. The initial clip will be empty. Next, assign another texture to the sprite sheet slot. When the timeline is playing, the base texture of the sprites will be changed to this new texture.


    Notes

    The sprite boundaries defined on the original spritesheet texture are always used, there is no need to define sprites on the second spritesheet texture.

    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