Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Cannot load Atlas During Build/Enter Game. Missing File ?

Discussion in '2D' started by mrm83, Jul 12, 2015.

  1. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    203
    I added some new sprites, gave them all the same packing tag and when i run the build or click on the "pack" button in sprite packer, i get this error

    "
    Cannot load Atlas During Build/Enter Game. Missing File ?
    "

    the sprite packer doesn't seem to be working.. or am i doing something wrong? please help if anyone has seen this issue.
     
  2. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    203
    I moved the folder containing the sprites out of the /Resources folder and now it packs fine.

    Seems like the textures can not be inside the Resources folder? is this a bug?
     
  3. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    203
    Assets/Resources
     
  4. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    966
    Resources folder is ignored by sprite packer by design.

    The resources folder is considered to be the "manual option" for users to do manually what they want with their assets. Everything in there will be loaded in the build and Unity keeps its hands off.

    Recommended way to use assets is to keep them outside of the resources folder and refer to them directly (and not with string path) so Unity can automagically clean unused assets from your build and pack sprites into tighter atlases etc.

    Lot of good discussion about this in this old thread: http://forum.unity3d.com/threads/un...t-pack-images-inside-resources-folder.248349/
     
  5. omgdave

    omgdave

    Joined:
    Nov 30, 2014
    Posts:
    8
    I am getting the same error. What exactly does the error mean? I have no sprites in the resources folder at all.

    I seem to get this error when I change compression on something? I have the AppIcon in the Assets folder (top level) and its import settings are Texture 16bits. If I change the compression to TrueColor, I get 16 of these errors. Any idea? I didn't even know the Texture compression was packed. Everything else in my project has Import Settings set to Sprite TrueColor

    Any ideas?
     
  6. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    183
    I'm getting a LOT of these errors all of a sudden as well. I have no sprites in the Resources folder. Any idea what could be causing this? When I build, I get 702 of them.
     
  7. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    @omgdave @Tonzie. Mind tell us what version of Unity are you guys using that cause the errors? I afraid it might be bugged if it never happen before but happen now. It would be really helpful if you guys can report the issue.
     
  8. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    183
    Edit: Replied to the wrong thread!
     
    Last edited: Aug 12, 2015
  9. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    183
    Sorry, I replied to the wrong thread with that above comment. I've removed it.

    I'm using 5.1.2f1 though, and I'm not sure what exactly is causing the problem to happen.
     
  10. dumaike

    dumaike

    Joined:
    Sep 4, 2013
    Posts:
    7
    I'm on 5.1.2f1 as well and also suddenly see a slew of these errors all of a sudden. I also don't have any textures in the Resources folder.
     
  11. rjevans

    rjevans

    Joined:
    Sep 24, 2010
    Posts:
    23
    I'm seeing this in 5.1.2p3, (my first version of unity 5.1) - was there ever a root cause of this error message?
     
  12. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    82
    If you guys could send a bug report with a project that can reproduce these errors, that would be great to help us solve this issue!
     
  13. Sphax84

    Sphax84

    Joined:
    Jun 23, 2015
    Posts:
    27
    I have that bug as well in Unity 5.1.2f1 and I don't have any "Resources/" folder at all (in "Assets/" one).
     
  14. JanTuts

    JanTuts

    Joined:
    Dec 19, 2012
    Posts:
    6
    I keep getting the same errors too. I submitted a report with my project and mentioned this thread and also you, ChuanXin, asking said bug report.
     
  15. Bearabeck

    Bearabeck

    Joined:
    Mar 3, 2015
    Posts:
    4
    I've just experienced this bug, has anyone found an answer? I have no sprites in Resources. My partner can build out just fine.
     
  16. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    183
    I uploaded a bug report for another issue, but the project in that bug report will reproduce this bug as well. See bug 726479. If you build the project to PC, you'll see these errors in the console.
     
  17. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
  18. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    I installed 5.1.3p3 and I never had this issue until now. Now I do have it, and it occurs occasionally :/

    Edit: This happens if I change targeted platform after taking a build for another platform. I.E. I took an x64 build for Win, then changed target platform to Mac universal, and I got the error.
     
  19. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    TanselAltinel, Please submit a bug with a test project that reproduces the issue. That will be helpful to fix this case.
     
  20. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    I updated editor to 5.2.1p2 and this error started to show up each time I hit play.
    I hit play, sprite packing starts, it finishes with this error or editor crashes. This is really frustrating :(

    Project file is bigger than a GB so I could not add it.

    (Case 733460)
     
  21. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    Cloud build for windows desktop x64 (5.2.1f1) gives this error in builds too :(
     
  22. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    Update, this time I was able to attach the sample project (Case 733725)
     
  23. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    TanselAltinel, Many thanks for submitting the project. We have fixed the issue that causes this error :

    "Cannot load Atlas During Build/Enter Game. Missing File ?" and hope to be make it available in the upcoming release.

    We understand from the project that you are using a single Packing Tag for all the Sprites. As a workaround, we would suggest to use :

    1) Try grouping the sprites and assign unique Packing Tags for the group instead of using a single tag for all the sprites. This is to prevent the generated Per Atlas Data File not too big (It ends up loading slowly in the Editor due to the massive memory required).
    2) Use TightRotationEnabledPackingPolicy so more sprites can be packed into Atlases. This can be set in the SpritePacker window.

    Sorry for the inconvenience caused. We will update this thread once the fix is available for download.
     
  24. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    @Venkify Actually I have 20 different sprite tags, and I tried them one by one, and as groups.
    The one I sent was crashing Unity, and there is one more that completes packing process (13 page of atlases) but when I add one more spritesheet with different Packing Tag, previous one (13 page one) will not be able to complete.

    I have over 20 different packing tag with many enemy, player, and effect types. I tried to send most useful one. Currently, I disabled packing in order to continue development.

    If this is a resource problem (I have 16 GB of memory and I can see while packing Unity uses 11+) I can set a unique sprite packing for a couple of spritesheets, assuming file reading operations will still be minimal.
     
  25. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    TanselAltinel,

    Yes, that would help. However from the project you attached to the bug, we understand that most of source textures used for sprites are of size 7500 x 5000 in PNG format. When this is converted to native formats for example to :
    1) ARGB32 results in a massive 190MB of Texture data each
    2) DXT (Scaled to Nearest POT 8192x4096) results in 170MB of Texture data each

    Also when SpritePacker processes these textures, it has to load texData for all potential textures which consumes even more memory. If possible, we would also suggest to scale-down the source PNG textures to sizes such as 2048x2048, 1024x1024 and import them to the project. This will not only improve the speed, memory of the Editor but also the runtime especially if you are publishing to mobile platforms.
     
  26. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,130
    This seems to be showing up in 5.2.1f. Will this be patched again?
     
  27. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    Fix did not make into 5.2.1p4, probably it will make into 5.2.2 or 5.2.2p1
    For a quick workaround I split project into smaller pieces to overcome errors.
     
  28. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    The issue has been fixed in 5.3 and will also be made available on the next patch for 5.2 (5.2.2 p2).
     
    ChiuanWei and TanselAltinel like this.
  29. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    I confirm that it is solved in 5.2.2p2
    First, I got out of memory error, but after a few tries and restarts, it successfully finished sprite packing completely. I'm so glad this is solved.
     
  30. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    TanselAltinel,

    Thanks for testing it. Also please note that starting from 5.3 and 5.2.2p2 we can also configure the disk-space taken up by the Sprite Packer. You can configure it upto 200GB as long as you have enough disk-space. The option is available under :

    Preferences -> 2D -> Maximum Sprite Atlas Cache Size (in GB)

    as in Screenshot.
     

    Attached Files:

    TanselAltinel likes this.
  31. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    Oh, I had not seen that option. I already set GI to max in my 3D project, I'll get same for 2D too.
    Great work, thank you very much :)
     
  32. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    547
    Annoying bug, and I wonder why this happens when I drastically reduce the texture max size for mobile with the texture overview asset. (https://www.assetstore.unity3d.com/en/#!/content/16937) I read this thread, but in my case lot of textures shrinked by max size. Probably the atlas builder doesn't look at the max size?

    (Unity 5.2.2f1)
     
  33. ChiuanWei

    ChiuanWei

    Joined:
    Jan 29, 2012
    Posts:
    83
    still error in Unity5.2.2f1..when i build some sprites in a assetbundle with the same packing tag.
    after succee.. i change one sprite's name...and build assetbundle again..
    oh no. error shown!
    Cannot load Atlas During Build/Enter Game. Missing File ?
     
  34. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
  35. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    143
    I just did a packing using 5.2.2p3
    You can see I have 30 pages of atlas, for just one boss. I have many bosses, player types, and effects here consisting 26 different packing tags.
     

    Attached Files:

  36. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    315
    Using 5.2.3f, and now instead of "Cannot load Atlas During Build/Enter Game. Missing File ?", we get:
    "Cannot load Atlas During Build/Enter Game. Please rebuild Sprite Atlas", and I can not rebuild the atlas.

    Also it seems the build sizes are inconsistent (I try remove tags and adding and instead of increasing or decreasing the build size just increases :?).

    Also, I am not sure the packing makes total sense, since it looks as if even though there is enough room in an atlas, it keeps other textures in a different atlas even though it has enough room once they have already been split earlier before I limited the texture sizes.

    This is a tremendous show stopper.
     
    Last edited: Nov 24, 2015
  37. ChiuanWei

    ChiuanWei

    Joined:
    Jan 29, 2012
    Posts:
    83
    my solustion is when some sprites changed and you know MUST repack. goto your */Library/AtlaCached delete them all.
    when build a new assetbundle will repack right.
     
  38. zibas

    zibas

    Joined:
    Sep 15, 2010
    Posts:
    29
    Getting this too. 5.3.0f4. Deleting the cache seems to straighten things out until I change the packing tag on anything.
     
  39. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    272
    Same problem here too, since 5.2.x at least. Now also with 5.3.2. "Cannot load Atlas [ATLASNAME] During Build/Enter Game. Please rebuild Sprite Atlas". Clearing the atlas cache helps but the problem quickly appears again, and I think almost always when I switch build target between Standlone <-> Android. Anybody reproduced this on a small project and filed a bug?
     
  40. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    @GuyTidhar

    Please check the Texture Importer options, if the options of the sprites/texture importer differ even though packing tag matches, then they are packed to different atlases even though there is enough room in 1.

    @GuyTidhar, @ChiuanWei, @zibas, @mh114

    Please try setting a higher AtlasCache Size in the preferences window :
    Preferences -> 2D -> Maximum Sprite Atlas Cache Size (in GB)

    Also please let us know what Editor you are currently using (Mac/Windows). Would also be great if you could submit a bug with a repro-project.
     
    mh114 likes this.
  41. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    272
    Ah, didn't know about that setting, will try increasing the cache size. I'll also try to make the problem happen on a clean project at some point, if I have some time.

    EDIT: It was set to 10 GB (btw you might want to add the unit GB to the UI there somewhere), I doubled it but I'm not sure this will make any difference. Last time I got the problem my AtlasCache folder was only 50 MB..

    EDIT: I'm on Windows 10, Unity 5.3.2. This has been happening since 5.2 days at least.
     
    Last edited: Feb 1, 2016
  42. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    272
    This bug is getting very annoying. I'm now in 5.3.2p3 and I get "Cannot load Atlas [ATLASNAME] During Build/Enter Game. Please rebuild Sprite Atlas." several times a day, always when I change build target and basically most of time I touch any of the sprites I have. Workaround is to quit Unity, delete the AtlasCache folder and restart. These wasted minutes add up quickly.. :(

    I tried to reproduce this with a clean project for 1.5 hours, and could not make it happen. I copied all my sprites and their settings, atlases are basically the same but no luck getting the error reproduced so I could make a bug report.
     
  43. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    85
    @mh114,
    Could you please provide the exact steps when the issue occurs ? What platform do you switch to when this happens ?
    Also if you are unable to reproduce the bug with a clean project, could you please provide the last few Editor logs when the issue occurred ?
     
  44. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    272
    Hi, I made a new thread for the issue with a bit more info, so I suggest we continue there.
    http://forum.unity3d.com/threads/sp...enter-game-please-rebuild-sprite-atlas.386524

    I switch between Mac/Win standalone and Android, on Windows. I'll post editor logs and steps tomorrow.
     
  45. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    222
    Happens to me whenever I switch platforms without fail (across multiple projects too). Have to delete the atlas cache every time. Can't remember exactly when it started happening but it definitely happens at least on Unity 5.3.1-5.3.3.

    As a side note (perhaps related), the sprite packer is very flaky with crunched textures. Crashes on various (all?) 24-bit RGB textures set to crunched (100% quality), etc. Cache size is set to max too.
     
  46. Sphax84

    Sphax84

    Joined:
    Jun 23, 2015
    Posts:
    27
    I still get the error on Unity 5.3.4f1:

     
  47. Born-FoR-deatH

    Born-FoR-deatH

    Joined:
    Nov 6, 2012
    Posts:
    2
    Close unity. Delete "Atlas Cache" folder from project "Library". Run unity and repack atlas
     
  48. Sphax84

    Sphax84

    Joined:
    Jun 23, 2015
    Posts:
    27
    This is working but some builds later, the issue just reappear... -_-"
     
  49. MrGuardianX

    MrGuardianX

    Joined:
    Sep 29, 2014
    Posts:
    40
    Got this issue in 5.3.6. We also got this in previous versions since 5.2 I believe when we started actively switching platforms for making automatic builds. This is very cool that Unity stuff don't know what is going on and can't strictly answer to our question.
     
  50. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    272
    Yep, I think I started getting this around 5.1 or 5.2..