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

Question Texture Sheet Animation not working in Sprites mode?

Discussion in '2D' started by MarcGameResort, Nov 24, 2022.

  1. MarcGameResort

    MarcGameResort

    Joined:
    Apr 11, 2017
    Posts:
    7
    Hello! I am experiencing a weird issue trying to set up a Texture Sheet Animation in a particle system. I am using a single atlas in a barebones project with just 6 animation frames. When I add those frames as sprites in the texture sheet list, I get the following error:

    "All Sprites must share the same Texture Atlas. Also check that all your sprites fit onto 1 texture of the Sprite Atlas."

    As a result, the particle system only displays the first frame of the animation sequence.

    I only have a single, tiny atlas (64x32) so not sure what the problem is. Is this a known bug? I tried both the V1 and V2 Sprite Packer.

    Help and thanks :)

    (Unity 2021.3.14f1. MacBook Pro, Apple M1 Max, macOS 13.0.1.)
     

    Attached Files:

  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Hi @MarcGameResort Could you please post a repro project? This should help understand the issue better. Will take a look asap.
     
  3. MarcGameResort

    MarcGameResort

    Joined:
    Apr 11, 2017
    Posts:
    7
    Thanks! I have attached a simple project if you wouldn't mind checking it out. Just open the SampleScene and select the Particle System. I am getting an atlas warning in the Texture Sheet Animation inspector section, and only the first sprite is displayed in the particle system.
     

    Attached Files:

  4. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Hi @MarcGameResort I took a look into the project and found the Sprites are correctly part of the SpriteAtlas rendering fine. (See attached screenshot).

    However note that the warning still appears if its Not in playmode as SpriteAtlas is only active in Playmode. In Editor mode, the warning is still present as they are from different textures. You can safely ignore the warning as long as all the Sprites are part of a SpriteAtlas.

    Also note that in 23.1 and onwards, SpriteAtlas V2 supports Editor mode use of SpriteAtlas. Thanks.
     
  5. MarcGameResort

    MarcGameResort

    Joined:
    Apr 11, 2017
    Posts:
    7
    Oh got it, thanks!

    I was so stuck on not seeing the sprite animation in preview that I didn't even try to run the project to generate the atlas LOL. Thanks again.