Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Frames with no sprite visible

Discussion in '2D' started by indy2005, Sep 10, 2020.

  1. indy2005

    indy2005

    Joined:
    Aug 22, 2009
    Posts:
    81
    Hi,

    So I follow a tutorial, create an animation, drag 8 sprites into the animation window. When I step through the animation certain keyframes have no sprite associated with them. This results in a flashing effect when the animation plays....

     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @indy2005

    "So I follow a tutorial, create an animation, drag 8 sprites into the animation window. When I step through the animation certain keyframes have no sprite associated with them."


    What tutorial? Also how does your sprites look in animation clip? Now I only see dots. You provide pretty much no other info other than you have key frames at those frames. Maybe you assigned incorrect sprite to some key frames.
     
  3. indy2005

    indy2005

    Joined:
    Aug 22, 2009
    Posts:
    81
    It was to do with the z-order. For some reasons it decided to put a few frames below another object...
     
  4. indy2005

    indy2005

    Joined:
    Aug 22, 2009
    Posts:
    81
    yep those dots are a dagger sprite, visible in the animation window - evaporating in the scene preview of the animator
     
  5. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @indy2005

    "It was to do with the z-order. For some reasons it decided to put a few frames below another object..."

    I guess then you should set the sprite sorting order, otherwise your elements might render in random order, not in order you expect.

    Here is an overview of Unity's 2d sorting:
    https://docs.unity3d.com/Manual/2DSorting.html