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. Dismiss Notice

Resources folder not included in desktop build

Discussion in 'Editor & General Support' started by Lopiken, Aug 26, 2015.

  1. Lopiken

    Lopiken

    Joined:
    Jan 15, 2014
    Posts:
    4
    There seems to be some file size limit on the Resources folder before it stops being included in the build. We built for both Windows and Mac and neither include the files in the Resources folder. I'm trying to narrow it down to the exact file size where it stops working, but I'm currently around 160MB with it not working, and it works fine at around 80MB.

    We've tried the following:

    Resources.Load(filepath);
    Resources.Load<GameObject>(filepath);
    Resources.Load(filepath) as GameObject;

    The files are txt files, 3DS files, and png files.

    Any ideas?
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Sounds very odd. Does the build give any messages that can help explain what's happening? I'd doubt there is some limit to file size.
     
  3. ferro

    ferro

    Joined:
    Aug 25, 2011
    Posts:
    13
    You should be able to make Gigabytes of resource folder. As far as I know there is no such limit.

    Is your Resource folder inside an Editor folder? If this is the case this behavior is just natural. Unity does not include resource folders that are inside Editor folders in builds.
     
  4. Lopiken

    Lopiken

    Joined:
    Jan 15, 2014
    Posts:
    4
    No, we don't get any messages.

    Here's our directory structure:
    Screen Shot 2015-08-27 at 9.01.11 AM.png
     
  5. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Hmm. So if you make one build and the Resources folder content exists all is good. If you make a different build, the Resources folder isn't included. How do the two builds compare? Does the second build run, but just can't find resources? Does the build messages that are generated for both build look identical? If you take the version that builds normally, and add say a 200MB something or other, does that build?

    (I guess I wonder if there is one asset that you have placed into the Resources folder which is causing a hiccup, so, alternatively, just divide the assets. So, you know 80MB works. Take the 80MB that creates the problem, and divide it into 2 40MB files. Add one of the 40MB in with the 80MB to create a 120MB Resources. Does that work? If it does, split the 40MB in half and add that. Can't easily explain, but you know to just try and track down if there is something in the Resources folder that creates the problem. That's what I'd do.)
     
  6. Lopiken

    Lopiken

    Joined:
    Jan 15, 2014
    Posts:
    4
    Both builds are identical, except for the number of pngs in Resources/Artworks. Both run fine, but the one doesn't have any of the files built with it. There are no messages when the build is created, unless I'm missing where these are logged. If we put the pngs from the broken build into the working build, it also doesn't work.

    Splitting up the files to find where it exactly breaks is what we're currently doing. It happens specifically with our folder of pngs, so we're hoping there's just one that's somehow screwing it up.
     
  7. tobusan

    tobusan

    Joined:
    Mar 3, 2016
    Posts:
    1
    Same problem here: empty Resources folder in windows desktop build.
    The original Resources folder in project is 29 megs in size and contains around 120 jpgs & pngs, a json file and OculusPlatformSettings. No warnings or errors whatsoever during build.
     
  8. yamins

    yamins

    Joined:
    Mar 4, 2016
    Posts:
    8
    Any further update about this?
     
  9. NiKoMaKi

    NiKoMaKi

    Joined:
    Nov 8, 2014
    Posts:
    15
    I just started having this same issue. No warnings or anything, just nothing is included in the resources folder. If I manually copy and paste everything from my project to the build, it runs fine.
    Has there been any answer to this?
     
    UnanchoredStudios likes this.
  10. NiKoMaKi

    NiKoMaKi

    Joined:
    Nov 8, 2014
    Posts:
    15
    This really needs to be fixed or at least explained so a work around can be done. The Unity reps on the PS4 dev portal have told me to come here to fix the issue, but there never seems to be a way to actually reach a Unity tech when needed.
     
  11. NiKoMaKi

    NiKoMaKi

    Joined:
    Nov 8, 2014
    Posts:
    15
    After removing some assets things started working correctly again, but now it is back, and with a minimum amount of resources used. Is there no one from Unity that can offer support for this???
     
    TooManySugar likes this.
  12. iamthecoolguy11

    iamthecoolguy11

    Joined:
    Jan 11, 2013
    Posts:
    8
    same problem but it only includes certain file types.
     
  13. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    It is Oct-2021 and I have a small project. it runs fine in unity, but the windows-PC build is unable to find its resource images. those images are inside a directory inside the resources directory inside assets.
     
  14. liberty742

    liberty742

    Joined:
    Feb 25, 2020
    Posts:
    1
    Good afternoon, I’m from the future, we still have the same problem here in the future, tell me in what decade the fix is expected, we would like to make the build before 2027