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

SpriteAtlas v2 removes support for Folders?

Discussion in '2D Experimental Preview' started by tonycoculuzzi, Jul 23, 2020.

  1. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    I hope this is the right place to post this!

    I've found the ability to include a Folder in the SpriteAtlas's Objects for Packing list very useful. It removes a lot of work, especially when trying to design asset pipelines or import many assets at once.

    In the SpriteAtlas v2 documention, it mentions that this feature is being removed: https://docs.unity3d.com/2020.1/Documentation/Manual/SpriteAtlasExperimental.html

    I'm not sure how many others I speak for, but I'd love if this feature could stick around.
     
    chrismarch and Radghiv like this.
  2. Unusual-Cadence

    Unusual-Cadence

    Joined:
    Aug 12, 2015
    Posts:
    42
    Yes, please don't remove folder support from the sprite packer! It saves so much time just being able to add new sprites in to a folder of organised sprites and have that atlas automatically update. Having to add individual sprites to a sprite atlas, especially keeping track of things after a large import, would be quite a bit of a timesink that doesn't exist under the v1 workflow!
     
  3. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    767
    +1

    I completely agree with all above. Please don't remove folders.

    Also, with V2, going into debug mode removed my ability to set the padding higher than 8. Without this, my sprites have issues overlapping. Is there going to be a way to increase padding above 8 in version 2?
     
  4. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    Woah, what, why? Wish there was some explanation. We use this for most of our sprite atlases, who wouldn't?
     
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    What is the logical explanation for removing such a useful, essential feature? What could possibly be down side on this?
     
  6. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    I feel like we're not going to get a response here unless someone creates a bug report.
     
    Peter77 likes this.
  7. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    I don't think Unity will think it is really a bug, since they know about it and still want to remove it.
     
    Prodigga likes this.
  8. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    I had assumed this would be fixed but if not it absolutely should be. Just to give a concrete example here.

    We have characters each with their own Scriptable. The Scriptable references a SpriteAtlas containing all the portraits for that character. This SpriteAtlas references a folder named the same as the character. Within that folder are all the portraits, which are named after the expression they show for that character. Our artist can just add new portrait expressions to this folder, and our writer can reference them in their dialogue script without having to mess with SpriteAtlases and Scriptables. With v2 that's not possible anymore.
     
  9. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    Oh I didn't mean to suggest it was a bug.

    What I'm saying is unity doesn't look at these forums as often as we'd like and sometimes our hand is forced into using the bug tracker as a means of getting a hold of someone.
     
  10. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Thinking about it, and maybe it is a good idea.
     
  11. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Humm.. On my second look at the link above, I could not find any information that folder support is being removed. Where did you find it?
     
  12. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,467
  13. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Right.. but have you tried to dragging folder to the atlas element slots? It does work for me and it does pack.
     
  14. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,467
  15. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    I am using 2020.2a19 and it seems to have been fixed.
     
    Peter77 likes this.
  16. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    SpriteAtlas V1 though flexible had a few known issues :

    1) SpriteAtlas packed data/textures were stored in Library\AtlasCache rather than the usual Artifacts folder. Hence it does not support Cache-Server/Accelerator.
    2) SpriteAtlas V1 does not support Asset Dependencies introduced by AssetDatabase V2. Hence changes have to be checked for each Sprite/Textures/Folder included in Atlas through custom hashing to see if they need to be repacked.
    3) A change of Platform may potentially require a repack of all the Atlases in the project.

    Sprite Atlas V2 solves all the issues above and takes advantage of benefits provided by AssetDatabase V2. However Folder is not a first-class Asset and therefore it cannot be added as a dependency. Besides automatic detection of any change to a folder may be quite expensive for large projects. We will continue to investigate supporting this.

    As of now, there are 2 known issues. Sprite Atlas V2 1) does not have full-fledged scripting support yet and 2) Packing is immediate as soon as you make changes in the Inspector. We will be addressing the above 2 soon. Will post an update.

    Please also note that we will continue to support Sprite Atlas V1 as usual.
     
  17. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Ple
    Please do correct me if I am wrong, but I am already using folder to the Atals v2 using Unity 2020.1 or 2020.2

    I add folder to the object to be included in the atlas and click preview packing and all seems to pack correctly?

    Or is it just looks like working and it is not actually working as intended during realtime play mode?

    I am massively confused on this. Without folder option, it's too difficult to work for my project.
     
  18. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,467
    If we need to add a Sprite to the SpriteAtlas by hand, rather than just adding an entire folder as in earlier Unity versions, then that's a tremendously huge issue from a workflow point of view you've introduced. Adding the contents of a folder automatically to a SpriteAtlas is really a must-have.
     
  19. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Even though it will pack the folder contents whenever its packed, automatic detection of any changes in the folder will not be automatic, hence its not recommended. Also you may not be able to drag a folder to the Packables for SpriteAtlas V2 Inspector.

    Please note that we will continue to support Sprite Atlas V1 (adding Folders as usual will continue to work on V1).
     
  20. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    I am able to drag folder to the object slot to add them to be packed. Also, I don't really mind repacking manually. Even if that is the only way it is 1000% better than having to add every single sprites manually. Besides, I may be able to create a custom editor script to repack all atlases automatically on click of a button, which will be , again, 1000% better than having to add sprites manually. Adding sprites manually, especially for like 1000s of them will definitely have human error. I choose manual repack of atlas over adding 1000s of sprites individually on any project.

    Besides, in Editor, it's not so bad if current atlas is 100% up to date because the game will still run and show sprites anyway (just not using atlas) but when you build addressable or actual game, it will repack the atlases so that's ok I think.

    So if Unity is thinking about removing current folder option (even if it stays as it is) please reconsider. It's really a bad idea. Let us at least use what we have.
     
  21. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    In that case, I would suggest to continue to use Sprite Atlas V1 (you can select it in Editor settings) as V1 still supports specifying Folders as Packables.

    Also please note that adding folders to Sprite Atlas V2 as Packable via Inspector is technically a bug. Could you please let us know the exact version of Unity you are using ?
     
  22. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,467
    Thanks for your reply. I think you introduced v2 for a reason, it's not like v1 is better in all cases and I guess v2 will also receive more love in the future. From a users point of view, it's from advantage to switch to v2 eventually.

    A better answer would have been: "Thank you for the feedback. I'll raise this issue internally with the team and we try to figure out how to improve the workflow by finding a way to auto-add sprites from a folder."
     
    chrismarch likes this.
  23. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    +1

    Just use V1 is not a good enough solution. Eventually V2 will become the status quo, right? The default option? What then. This is a major downgrade to sprite atlas and can't just be hand waved away because V1 hasn't been deprecated yet. Because one day it will, and we will all be stuck using it. This should be addressed sooner not later.
     
    Peter77 likes this.
  24. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Thanks for the feedbacks. Yes, we will investigate and provide support folder as packable in Sprite Atlas v2 in a future update.
     
    chrismarch, firstuser and Peter77 like this.
  25. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    I am using Unity 2020.1.0f1 and 2020.2a19

    I can't believe I am saying this, but.

    PLEASE DO NOT FIX THIS BUG..! It works and it is better to have this than not having it so why "fix" and make it worse?
     
  26. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    If I understand correctly, it means if you edit any of the assets in those folders then it won't actually regenerate the atlas.
     
  27. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Yes, that's correct. Editing or adding new assets to that folder will not regenerate the Atlas.
     
  28. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    I can understand this, and it just needs to be stated in the document rather than removing the feature. Please just leave it as it is, and once auto update feature is enabled sometime in the future, just let us know then. In mean while, we can manually update atlases or create custom editor script to repack it in semi-automatic way.
     
  29. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    @Venkify on a slightly different note... It's this new asset database V2 dependency system available for us to use in our own tools? IE if we have editor scripts and custom importers to create new asset types that depend on other assets in the project?
     
  30. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Prodigga likes this.
  31. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    I have just added a simple button to repack all my atlases when I need in my custom tool set, and everything seems to work. It is so much better to just add sprites to the folders and then once in a while, or when I need to test atlas, just click a simple button to repack all my atlases. I can't think of any other way to work other than this, having to add sprites to individual atlases all the time and tracking of them feels almost impossible task right now.
     
  32. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    Surely there's a way in v2 to include some kind of folder reference, and have the editor automatically add anything in the folder to the objects for packing list?
     
  33. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    I just want to add that whatever technical limitations make this difficult to support are limitations that all of us end users will need to overcome by ourselves if Unity doesn't fix it at their level. It's much easier to fix for Unity, since they can add engine functionality where needed.

    Imagine how janky our solutions will be if even Unity themselves couldn't find a nice way to do it.
     
  34. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    819
    Please dont do it like V1 did, but instead use an importer like all other assets.
     
  35. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Yes, V2 is based on Asset Importer workflow like native Mesh/Texture Importer etc and hence supports Dependencies and Accelerator.
     
  36. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    732
    Just wanted to test the new SpriteAtlas V2 on my huge project ( about 15K individual sprite sheets from very small consisting only of a few sprites and others, huge 8k sheets where one anim stretches over several such sheets ).
    Of course this is all organized cleanly in folders for the textures/sprite sheets )
    And now i just noticed in the docs that folders cannot be dragged onto the atlas definition any longer and its uncertain that new additions per folder will be dedcted if you do
    So how someone is supposed to use V2 with a project like this when there is now folder support?

    i strongly hope that this is just a preview limitation of V2 ...
     
  37. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    It doesn't seem like it, it seems like a limitation they initially intend to release with.

    Hopefully @Venkify has raised this issue internally (update please? :) ) and is now being looked on to. Without an update we have no way of knowing.
     
    Peter77 likes this.
  38. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Which is why the folder option, despite its short coming such as non detection of any new sprites added, it should still be there and available for us so that we can at least manually click a button or call api to pack it ourselves. Having no option to use folder no matter how limited they are is like... unthinkable.
     
    MousePods likes this.
  39. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    108
    I agree with the rest in this thread, folder support is essential for Sprite Atlas!

    You state in https://blogs.unity3d.com/2020/08/13/the-road-to-2021/ that you will focus on "Workflows and usability: quality-of-life fixes" - releasing Sprite Atlas V2 without support for adding folders is actually the opposite of this.
     
  40. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Yeah, just imagine 1000s of them... I have couple of 100s and I can't manage them without using folder option already.
     
    MousePods likes this.
  41. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    732
    any news on that front?
    reverting the decision to dump folder support possibly?
     
    tonycoculuzzi and Prodigga like this.
  42. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    Today, I was checking my project settings and found out that I had atlas version 1 enabled.... instead of v2. Which explains why my folder option was working... and that was heart breaking. So my initial assumption that v2 folder was working was wrong... Now I feel insecure, uncertain that when v1 will be deprecated and not feeling good about using the futire technology. Please bring the folder option back for v2.
     
  43. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Hi everyone,
    Thank you all for highlighting this concern with the experimental Sprite Atlas v2.
    We completely agree that being able to pack folders is an important part of what makes Sprite Atlas v1 a useful feature in 2D workflows.
    Currently support for folders as a packable object is not available for Sprite Atlas v2. However we have identified it as a must-have feature for Sprite Atlas v2 before it leaves experimental status.
    In the meantime Sprite Atlas v1 will still work as before and should be the preferred way to work with Sprite Atlases in Unity.
    Thank you for your feedback and your patience. We will be sure to let you know when we have more to share on the progress of Sprite Atlas v2.
     
  44. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    you da man rus :D much appreciated!
     
    rustum likes this.
  45. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    rustum likes this.
  46. Seromu

    Seromu

    Joined:
    Nov 30, 2015
    Posts:
    34
    firstuser, MousePods and Prodigga like this.
  47. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    Hell yeah nice work Sprite Atlas v2 team!
     
  48. Badinha

    Badinha

    Joined:
    May 6, 2021
    Posts:
    5
    chrismarch likes this.
  49. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,807
    I wouldn't bet on that. New features are not backported to earlier versions of the engine, even for packages.