Load into memory without Ressource.Load / AssetBundles

Hi,

I have a project in which performance/fast loading is required and the deadline is coming up fast.

Basically, imagine having a scene in which you have a boat. That boat has over 3000 different objects in it, separated into “compartments” (engine room, accommodations, ect…) with hi-res textures. You explore it in first-person.

Each compartment (and the objects inside) is created in 3DS Max and exported into Unity by FBX. So when imported, the prefab that contains the objects updates itself easily along the textures and the work-flow is clean and fast. I do however lose control of “placing/instantiating” the objects individually in unity because I do it in 3DS.

I’m using culling masks and the combineChildren script to optimize it all. Only 1 compartment is visible at a time and it does help a lot the performance by reducing the draw calls. However, because the compartments are not all loaded at start (visible to the camera) the textures are not loaded into the memory, so when I enter the compartment and rotate the view, it lags. This is due to the fact that the textures are loaded into memory only when the camera “sees” the objects. After they are loaded, everything is fine.

Now my problem;
If I use Ressource.Load I need to put everything into a “/Resource” folder and it seems for future considerations that it is a pain to remove them for the memory and can cause crashes/problems when it’s massive (can’t take that risk).

If I use the AssetBundles, I need to massively change the architecture of my project. Also, each time I want to “compile” a new version with new assets from updated FBX files(more are in development), I need to recompile new bundles and I just can’t spend 10h/week doing only that. Multiple bundles * Multiple updates * Multiple FBX imports = … well a lot of time / day and I don’t have the fastest computer.

The easiest way would be something along a:
A*: (fugly*) Script that rotates the camera (player) 360 degrees automatically when changing compartment (while a loading screen is hiding it all…).

B*: (not really better) Show all compartments at start (2nd camera that see’s all), wait until it has finished loading and then show only the one that player is in.

*: Is there some functionality unknown to me that allows you to check if textures are being loaded into memory and when it has finished ?

C: Something along Resources.Load, called on run-time and with objects already instantiated. Basically what the camera calls when it “sees” an object which texture hasn’t been put into memory yet.

Sorry for the long post… wanted to be as clear as possible.

Thanks.

Sounds like the only other alternative is the WWW class, but I am not sure it will be fast enough. I did a timing test with different image sizes. You can see results here

http://forum.unity3d.com/viewtopic.php?t=62695&start=0&postdays=0&postorder=asc&highlight=download+test

Thanks for the reply, sorry for the delay in the response, had lost hope on any reply.

Ended up using the resource.load, didn’t really had any choice… hopefully I won’t regret it.

Very interesting test with the WWW class, might get into it later on, sad you didn’t get any replies about it.