- Home /
Resource.LoadAll not working in build (works in editor mode)
I run my game in the editor with no issues. But suddenly in this new scene the Resource.LoadAll is NOT working when I do a build (webplayer or Win stand alone).
I have checked the array on load and it is at 0 (instead of the known value of 7)...
Of note is that my other resource files are being pulled in. When I check the dependencies they do not get highlighted but I have not had this issue in other scenes.
Anyone else seen this? I have never had this happen in other scenes when I have built and tested them...
I have double checked that my directories have not moved and that the files are in fact there (or they would not load in the editor version either)...
Any ideas?
Answer by KrankyBoy · Mar 05, 2010 at 10:45 PM
It was a setting in the Player options. I had the first streamed resource option set to -1 as I was having issues with the web player in the past and had set this value to get around it.
Answer by sulas · Mar 05, 2010 at 10:07 PM
I had a similar problem a few times, my game was running fine in the editor and not so fine in any of the builds. What I did was, select my scene - select all dependencies - export as package - make a new project - import the package.
This has worked for me, hope it works for you as well.
The problem with that is I have many scenes so this would be an issue. Almost like starting from scratch and importing everything. The only thing I can think of doing is referencing explicitly every single texture so it gets added. Since Resources are loaded dynamically at runtime I am not sure why they are not all always added!?