Resources.Load() failing in build if Resources folder has too many files

I’ve seen a number of questions asked about using Resources.Load but I have not found the answer to my problem.

I am creating an application that involves playing video clips. I originally tried using MovieTexture, but the video lagged in the application. I then opted to convert the video into a folder of images/frames and play the video using them. I used Resources.Load over WWW as WWW caused in game lag/delay. This was successful.

However, as I uploaded my third folder of images I found that my application no longer worked when I built it (it still worked in the client). When built, the Resources.Load function found nothing in the Resources folder. After some fiddling, I found a breaking point in the Resources folder whereby if I add one single additional image the built application will go from functional to broken.

Has anyone encountered this before or can suggest workarounds? Preferably without lowering the quality of the images.

I have encountered this problem before. In my case, it was because I tried to load a file and put it in a variable that had the same filename as a different filetype, which got loaded instead, and Unity foolishly tried to put it into the desired variable type and gave me errors. Lesson: Never have the two files of the same name in the same folder, especially not if they are nof different types.