- Home /
load scene from AssetBundle file in 5.3.4
LoadAllAssets function no longer works on scene asset bundles :( this worked fine in previous versions.
i use this simple scriptline to export: BuildPipeline.BuildAssetBundles("ExtensionExport", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
How can i fix this? Am i have to change any export options, or scene properties somewhere? I just wana load the scene with all assets, and start it.
I always get this error now:
InvalidOperationException: This method cannot be used on a streamed scene AssetBundle. UnityEngine.AssetBundle.LoadAllAssets (System.Type type) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/AssetBundleBindings.gen.cs:320) UnityEngine.AssetBundle.LoadAllAssets () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/AssetBundleBindings.gen.cs:303)
thanks for help
I seem to be having the same issue in WebPlayer. Any ideas?
I'm having the same issue on 5.4 in the Editor on Windows.
Answer by ForceMagic · Aug 09, 2016 at 07:01 PM
Refer to this answer : http://answers.unity3d.com/answers/915916/view.html
Basically it tells you that you should load Scene bundles like that
string[] scenePath = bundle.GetAllScenePaths();
Debug.Log(scenePath[0]); // -> "Assets/scene.unity"
Application.LoadLevel(scenePath[0]);
Your answer
Follow this Question
Related Questions
BuildSreamedScene : The class defined in script file named '***' does not match the file name! 1 Answer
How to import the object from server to unity 2 Answers
Streaming parts of a level into the scene 0 Answers
Loading scene from assetbundle (url) 1 Answer
How to load scene additively and keep Occlusion Culling Data? 0 Answers