Hi!
I'm the creator of the Network Extensions Project.
After created (only) 12 new roads, we have come to realize that it takes a LOT of assets (textures and meshes mostly) to create each roads (600 assets for 12 roads...).
We are currently using a custom process to load each textures (via unity) and each meshes (via ObjUnity3D). A simple process that is taking more and more time for each road that we are implementing.
We went throughout the Unity3D documentation to noticed that we could bundle all those assets together to accelerate the loading process.
We have managed to create the bundle so far (with the Unity IDE), but haven't succeeded in loading the bundle.
Could anyone guide us to implement that loading process?
Here is the code we have so far:
Take 1
using (WWW www = new WWW(BundleURL))
{
yield return www;
if (www.error != null)
throw new Exception("WWW download had an error:" + www.error);
AssetBundle bundle = www.assetBundle;
// ^^^^^^
// bundle is null!!!!!!!
}
-----------------------------------------------------------------
Take 2
using (WWW www = new WWW(BundleURL))
{
yield return www;
if (www.error != null)
throw new Exception("WWW download had an error:" + www.error);
AssetBundle bundle = AssetBundle.CreateFromMemoryImmediate(www.bytes)
// ^^^^^^
// Can't read the header?? (of a bundle made from Unity IDE??)
}
I'm the creator of the Network Extensions Project.
After created (only) 12 new roads, we have come to realize that it takes a LOT of assets (textures and meshes mostly) to create each roads (600 assets for 12 roads...).
We are currently using a custom process to load each textures (via unity) and each meshes (via ObjUnity3D). A simple process that is taking more and more time for each road that we are implementing.
We went throughout the Unity3D documentation to noticed that we could bundle all those assets together to accelerate the loading process.
We have managed to create the bundle so far (with the Unity IDE), but haven't succeeded in loading the bundle.
Could anyone guide us to implement that loading process?
Here is the code we have so far:
Take 1
using (WWW www = new WWW(BundleURL))
{
yield return www;
if (www.error != null)
throw new Exception("WWW download had an error:" + www.error);
AssetBundle bundle = www.assetBundle;
// ^^^^^^
// bundle is null!!!!!!!
}
-----------------------------------------------------------------
Take 2
using (WWW www = new WWW(BundleURL))
{
yield return www;
if (www.error != null)
throw new Exception("WWW download had an error:" + www.error);
AssetBundle bundle = AssetBundle.CreateFromMemoryImmediate(www.bytes)
// ^^^^^^
// Can't read the header?? (of a bundle made from Unity IDE??)
}
- 4