- Home /
Problem with large resources folder
I have a project where the Resources folder is really big. The resources.asset file from a complete build ends up at >2GB. I know that this is ridiculous and we will slim that down eventually. However I noticed some odd behaviour with that. Most of the assets in there are textures. But there are also some text files for localization in it. So if I build the project and start the executable (Windows standalone) it can't find those text files in the resources folder. Im sure they should be in there, because the same project runs fine in the editor. Now if I delete the folder containing those huge textures from the resources folder so that the resources.asset file has a size of ~300MB the build runs fine and it finds all the text files.
Edit: As it maybe relevant: I'm running this on a 64bit Windows7 machine.
I know how to work around it, but the question arises if there is a limit to the size of the resources folder. And if there is one what's the magic number and why is there no warning from the build process?
That's an interesting question.
As a workaround you could try to put some resources inside separate scenes and use Application.LoadLevelAdditiveAsync to load them into your current scene or just Application.LoadLevelAdditive if you don't own a pro version.
With a pro version, it would be easier and more flexible to use Asset Bundles.
Thanks for the reply. I can workaround that problem, but I was wondering about the limitations and technical details of the resources folder.
I'm facing the exact same problem. I have tons of png images that are in my Resources folder that I load using Resources.Load. When their size is large (roughtly 2 Go) the app won't launch. I don't understand how having them in another scene and load it using LoadLevelAdditive would solve the problem. What workaround did you found ?
I've encountered this issue as well. On windows you simply won't be able to install the application. On OSX the application will run but the resources.asset file will be corrupt and only some of the assets inside will be loadable. I also have a crapload of pngs that I need to load at runtime. Does anyone have a solution for including so many images in your project without Xcode or Unity trying to load them all into memory at once?
2015 here, still having this same issue, anybody managed to find a workaround for this?
Answer by Dave-Carlile · Nov 04, 2013 at 03:44 PM
I'm not 100% sure of this, but if Unity compiles to a 32-bit application, that application has a 2GB file size limit regardless of the 64-bit OS. The Resources folder is compressed into a single file, so if that file exceeds 2GB in size there will be problems. Now, I would think that you'd have full on errors rather than just oddities, but it's possible Unity is hiding that somehow.
Unfortunately the same problem happens when I build using architecture x86_64.
Hmm - not sure then. The LoadLevelAdditive
thing would work in theory by allowing you to put the resources in multiple files, keeping each under 2GB.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Set texture / EnableKeyword not working in build 1 Answer
scene buggy when built 0 Answers
Beta version build problem 0 Answers
Build error 2 Answers