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

Does the Sprite Packer pack unused sprites?

Discussion in '2D' started by _Adriaan, Nov 13, 2015.

  1. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    I couldn't find this in the docs immediately. I bet it doesn't, but can anyone confirm this?
     
  2. Nieles_GH

    Nieles_GH

    Joined:
    Jun 26, 2017
    Posts:
    57
    I was just searching for the same answer, but from what I see it does pack all sprites, also the unreferenced ones.
    It would be great tho if it wouldn't, that would save us a lot of hassle of keeping out sprite folders clean ourselves.
     
  3. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    618
    Yes, it would pack all sprites that are set. This is because Sprites can be dynamically loaded through Asset Bundles, Resources etc.. and it would be impossible to infer its usage/reference.

    I would suggest using SpriteAtlas that provides several ways of usage like Late-Binding etc.. and check if it suits the need.
     
    Nieles_GH likes this.