x


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?

more ▼

asked Mar 05 '10 at 08:30 PM

KrankyBoyGames gravatar image

KrankyBoyGames
2 1 1 4

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Mar 05 '10 at 10:45 PM

KrankyBoyGames gravatar image

KrankyBoyGames
2 1 1 4

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Mar 05 '10 at 10:07 PM

sulas gravatar image

sulas
111 5 5 11

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!?

Mar 05 '10 at 10:28 PM KrankyBoyGames
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x653
x434
x216

asked: Mar 05 '10 at 08:30 PM

Seen: 1698 times

Last Updated: Mar 05 '10 at 08:30 PM