- Home /
Load Scene's Object Bundle After Scene(Level) has been Loaded
Hi, all
I made two AssetBundle files, one is scene and the other is scene's Object, like following fake code:
BuildPipeline.PushAssetDependencies();
{
// generate fbx(prefab) AssetBundle
BuildPipeline.BuildAssetBundle(...);
BuildPipeline.PushAssetDependencies();
{
// generate level's AssetBundle
BuildPipeline.BuildStreamedSceneAssetBundle(...);
}
BuildPipeline.PopAssetDependencies();
}
BuildPipeline.PopAssetDependencies();
so that the scene AssetBundle file is much smaller to download and load easier, I load scene AssetBundle before scene's objects , like following fake code:
IEnumerator LoadFunction() {
WWW www = new WWW(...); // download the scene first
yield return www;
Application.LoadLevelAdditive("scene");
... // many other operation later
if(canVisible){
www = new WWW(...); // download the scene's object at some condition
yield return www;
www.assetBundle.LoadAsync(...);
}
}
Problem is the scene's object is display abnormally, it maybe invisible, if I load the scene's object first (before scene loading), it's right.
My method can make scene (Level) load quickly and download scene's objects selectively.
Has any method to refresh current loaded scene(Level) in order to retrieve/reload asset which download/load after scene(Level) has been loaded?
Thanks a lot!
Your answer

Follow this Question
Related Questions
How to import the object from server to unity 2 Answers
Load AssetBundle(scene object) after LoadLevel 0 Answers
Asset Bundle Download Problem 0 Answers
Loading an asset bundle is null on second load 0 Answers
Loading asset from system path 0 Answers