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

New 2D Lights with many Sprites on Screen causing Frame Loss

Discussion in '2D' started by Igotlazy, Feb 14, 2020.

  1. Igotlazy

    Igotlazy

    Joined:
    Jan 15, 2018
    Posts:
    65
    So currently the way I'm placing assets within my scene is similar to the game Hollow Knight. As in, the level is built from many small sprites that work on top of each other in order to form a unified look.

    Examples of the style can be seen here, and at the bottom of the article there is a gif that actually shows the sprites within the scene view.

    https://unity.com/madewith/hollow-knight

    As I began placing sprites however, the framerate quickly began to struggle, even in build. So my question basically is, are 2D Lights compatible with this type of sprite placement, where are there are tens if not hundreds of sprites on screen? Is there anyway to bake the light at the moment so it doesn't constantly need to deal with lighting to many objects? Should I be using the regular 3D Lights or some other strategy instead?
     
  2. eses

    eses

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

    Haven't used new 2D lights but - how much empty space you have around your sprites? I mean, do you use alpha textured sprites, and how close to the edge of opaque area have you shaped your sprite meshes?

    It would also be interesting to see how you have actually overlapped the sprites, and how many sprites there are on screen.

    And what is your target resolution?