- Home /
Is there a scene count limit for asset bundles?
I've encountered a problem where our asset bundle download fails once our bundles contain more than 110 scenes in total. It doesn't matter what order the bundles are downloaded in, the failure always seem to occur when we hit 110 scenes. The number of other assets (textures, etc) seems to make no difference.
The log looks something like this.
starting www download: http://madeupserver.com/my_bundle_name.unity3d http://madeupserver.com/myscene.unity3d cached to /var/mobile/Applications/FA0B5D9B-C9DF-4B35-B476-3A4576E86F80/Library/UnityCache/Shared/b4f1d52f80f00ba468efb79a9cc743fcf7fafdff loading from cache: http://madeupserver.com/my_bundle_name.unity3d Could not open file /var/mobile/Applications/FA0B5D9B-C9DF-4B35-B476-3A4576E86F80/Library/UnityCache/Shared/b4f1d52f80f00ba468efb79a9cc743fcf7fafdff/BuildPlayer-my_scene_name for read (Filename: Line: 139)
Note that it will always be the 111th scene downloaded, not the first scene in the bundle, and switching the download order will move the error to a different scene (because that's now 111th!)
So I'm wondering if that's an intentional limit? I know scenes are numbered in the build settings. Is there perhaps a reserved set of numbers for scenes in bundles? I'm building for iOS in case that matters.
Bump.
I'm getting errors around the 70 mark. $$anonymous$$y errors are like the following when trying to build for Android. The reported scene builds fine when it's the only scene in the asset bundle.
An asset is marked with HideFlags.DontSave but is included in the build:
(You are probably referencing internal Unity data in your build.) UnityEditor.BuildPipeline:BuildStreamedSceneAssetBundle(String[], String, BuildTarget) DCLessonBundlerWindow:BuildSingleAssetBundle(RemotePackageSettings) (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:193) DCLessonBundlerWindow:BuildSettingsNode(SettingsNode) (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:102) DCLessonBundlerWindow:BuildAssetBundles(IEnumerable`1) (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:95) DCLessonBundlerWindow:ShowPackagesTab() (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:77) DCLessonBundlerWindow:OnGUI() (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:53) UnityEditor.DockArea:OnGUI()
Building - Failed to write file: BuildPlayer-L10043.sharedAssets UnityEditor.BuildPipeline:BuildStreamedSceneAssetBundle(String[], String, BuildTarget) DCLessonBundlerWindow:BuildSingleAssetBundle(RemotePackageSettings) (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:193) DCLessonBundlerWindow:BuildSettingsNode(SettingsNode) (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:102) DCLessonBundlerWindow:BuildAssetBundles(IEnumerable`1) (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:95) DCLessonBundlerWindow:ShowPackagesTab() (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:77) DCLessonBundlerWindow:OnGUI() (at Assets/Core/Code/Editor/DCLessonBundlerWindow.cs:53) UnityEditor.DockArea:OnGUI()