Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

why totalCells for SpriteManager not working?

Discussion in 'Scripting' started by ashmira, Apr 7, 2011.

  1. ashmira

    ashmira

    Joined:
    Oct 19, 2010
    Posts:
    18
    I'm trying to animate a Quadratic sprite sheet of 5 column, 4 row and 18 sprites in it...

    11111
    11111
    11111
    11100

    *1 = sprites
    *0 = empty space on sprite sheet

    I set every thing in the BuildUVAnim function:

    targetAnim.BuildUVAnim(startAnimUV, cellSize, 5, 4, 18, 10);

    It seems right, but when I click play, the animation does play, but it also animate the empty space too... which makes it looks like a blinking textures... Please tell me what I did wrong...