Bundle Manager[Released]

Bundle Manager[1.2.1]

Hi everybody,

I’m an independent game developer. I have worked with Unity for 3 years in game development.

When working with Unity, I found that the bundle system is pretty frustrating for programmers. It needs so much hard coding works, and you need keep changing the code to adapt the rapidly changing assets structure. So I made this plugin.

===============================================================

Bundle Manager is a Unity streaming solution based on asset bundles which provides a way to create, edit and optimize your bundles without any coding.

The native Unity bundle management approach usually contains too much hard-coding. The goal of this tool is to get programmer liberated from the resource management work. Let them focus on resource using but not resource packing.

Features

Code free bundle management.
Create and edit your bundles without need to touch code.

Bundle dependency management.
Reuse assets in multiple bundles to save your player’s time and bandwidth.

Incremental building.
Skip unchanged bundles in bunlding to save your time.

Download priority.
Automatic runtime priority management. Choose which bundle you want first.

Bundle verisons.
Automaticly version number management for unity cache.

Intuitive user interface.
Unity native GUI style. Start using Bundle Manager in 10 mins.

Here’s our Official Website | Store Link | Email | Trial Version

================================================================
About Unity 5
Many questions about new Asset Bundle system Unity 5. So I write my opinion here:
It’s glad to see that Unity finally trying to face this mess.
BM have lot of common with this new system, GUI only management, incremental building, etc. But we have some design differences on how to deal with bundles.

1.GUI design. We think streaming solution is a big deal for Games. So we give BM a whole window to deal with it. Compare to Unity’s small widgets, BM will be more convenient if you have too many bundles.

2.Bundle dependency design. We and Unity both agree hard coding dependency management is torment for developers. So in the new system, Unity want manage bundle dependencies automatically. But we think developers need full control on the dependencies.
Sometimes we just don’t want bundle A depend on bundle B, even they have same x asset. Because bundle A or B may have some other assets much bigger than x.

As a plugin created more one year, we have some small functions Unity don’t have.
Also new system have functions we don’t have, like bundle variant. So you should be careful to decide use BM or New Bundle System.

For now BM will keep working on legacy bundle system. Since the new bundle API is not open enough, that we cannot edit the bundle content. And there’s no way to manage dependencies manually. If the new system API keep evolve, once it’s ready, we will move to the new API.

Here’s short tutorial.





New Version!
1.2.1

-Added support for WebGL
-Added method for checking if bundle is cached.
-Added ability to rewriting priority of bundles in waiting list.
-Fixed bundle priority cannot be saved in Editor.
-Added/Fixed some document.

2 Likes

Bump. New version compatible with Unity 4.0.0 is now on live!

I’m considering purchasing this…looks great. However the video does not demonstrate the runtime side. Can you provide some screen shots or a second video on this…my worry is…great now I have them all organized, but how do I download them and use them in my game dynamically at runtime.

Great question.

We provides DownloadManager for realtime streaming work.
There’s a snippet for DownloadManager:

using UnityEngine;

public class TestDownloadManager : MonoBehaviour 
{
	IEnumerator Start()
	{
		yield return StartCoroutine( DownloadManager.Instance.WaitDownload("LE.assetBundle") );

		WWW www = DownloadManager.Instance.GetWWW("LE.assetBundle");
	}
}

The DownloadManager will stream all the requested bundles by their dependencies and priority automatically.
For example, if you have a bundle tree like this:
1505429--85033--$Screenshot 2014-02-02 15.16.18.png
You can download bundle LAAAAA directly without care about the depended bundles. DownloadManager will make sure depended bundles be prepared before downloading LAAAAA.

For more information plz check API Reference

Also there’s a full test case in the Asset Store Package, It’s a good example for the new starters.

Thanks for the info. And to clarify…I do have Unity Pro…but not Android Pro. Will this asset still work as intended. I assume it just needs the standalone Unity pro which is required to build assets.

You can’t load asset bundle on android if you don’t have the Android Pro license.

Hi. YinXiaozhou

I’m purchasing this… it’s very greate tool…

but. i found bug…

steps

  1. open bundle manager
  2. create asset bundle( it’s name “a”)
  • a is empty
  1. create asset bundle(it’s name “b”, “b” to make “a” sub)
  • b is full(fbx, prefab…etc.)
  1. build
  2. build failed…
    output log
No assets were provided for the asset bundle
UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[], String, BuildAssetBundleOptions, BuildTarget)
BuildHelper:BuildAssetBundle(String[], String) (at Assets/BundleManager/Src/Editor/Core/BuildHelper.cs:271)
BuildHelper:BuildSingleBundle(BundleData) (at Assets/BundleManager/Src/Editor/Core/BuildHelper.cs:312)
BuildHelper:BuildBundleTree(BundleData, List`1) (at Assets/BundleManager/Src/Editor/Core/BuildHelper.cs:162)
BuildHelper:BuildBundles(String[]) (at Assets/BundleManager/Src/Editor/Core/BuildHelper.cs:122)
BundleTreeWin:BuildSelection() (at Assets/BundleManager/Src/Editor/GUI/BundleTreeWin.cs:611)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)

Hi jabi,

That is not a bug. Bundle Manager cannot build a bundle without any asset, so it complains error messages on empty bundles, and refuse to build the tree which contains that bundle. But it will go on build for other bundles which dose not depend on the empty one.

:smile:

Hi. YinXiaozhou …

Perhaps now the time to be the sort of Bundle Window

Sugestion… add Function… Sort of BundleName

  • Because a lot of the time the bundle is difficult to recognize.

Yeah, I found it’s difficult to find out the target bundle too when there’s too many of them.
Right now the bundles is sorted by the order you add them. Some times it’s better than by name.
I don’t really want to just add a sort type button on the toolbar, because I don’t want to mess it up.
Any way I’ll try to find out a way to deal with this.

Thank you for your feed back Jabi.

Thanks . YinXiaozhou. Quik support…

Sorry. More Questions…

step 1.

  • Use Shader: Unlit/Texture, MatcopShader
  1. Build StandAlone

  2. Load bundle

  3. Fine!!

  4. Build Android

  5. Load bundle

  6. Fail…

  • Pink.pink… pink…

step 2.

  1. editor Android Mode
  2. Build Prefab include to Mecanim
  3. Load Bundle
  4. Fail
  • Crash
  1. editor Android Mode
  2. Build Prefab include to Mecanim(add BuildAssetBundleOptions.CompleteAssets)
  3. Load Bundle
  4. Don’t Crash… but Pink… pink…

The pink problem may be the shader compatibility issue on android. Can you try a diffuse shader?

For the second crash problem can you send me the minimal project which can reproduce this? Also what’s your Unity version.

Thanks Suport…

step1 .

  • shader issue. i resolve
    step2.
  • Only one Object problem.
  • It’s strange…
  • build / rebuild / build all / rebuild all → bundle size very small(600kb)…
  • but… Select the project that builds the Object → bundle size 3mb… why??(i think… bug…)

More Questions

  1. why not use “Cashing.Ready” ??
  2. When use AssetBundle.Unload ??
  3. DownloadManager.Start() not use www.Dispose … why??
  4. How to use “Sort by Name”?? ( i upgrade 1.0.6 ^^)

I don’t really get you. Do you mean the size of bundle file is much bigger than the size shows on the Bundle Content window? If that’s the problem, it’s very weird, because the size shows on the GUI is comes from the file size directly. Plz check it again because it’s never go wrong in our project. If you still get that, can you send me the file included in your bundle? Then I can try to build it on my own machine.

About the other questions,

1.Caching.Ready is not necessary when use Unity cache, WWW.LoadFromCacheOrDownload is all you need.

2.If you want to save your runtime memory you can use AssetBundle.Unload on the assets which you never use anymore. But be careful, it’s very easy to produce errors if you unload some bundles whose assets is still in using.

3.In DownloadManager.Start, all WWWs are local variables. System will dispose them automatically when it’s running out of the scope.

Hi there,

1.0.6 is released with a lot improvements(Including sort with name). Go to asset store and check it out.

Good Feed Back…

hm. i updated 1.0.6…
Ok… Step 2 is generated randomly.

  • I’ll send occurs.

more question… ^^;;;

  1. my unity 4.3.3

  2. How to use sort with name

  3. shader name is empty… ;;;;;

  • editor run(android mode)
  • bundle build(uncompress/compress)
  • startdownload
  • getwww()
  • m_TempSharedMaterials[j].shader.name is empty
  • Shader is Mobile/Particles/Alpha Blended
    void RefreshShader(GameObject go)
    {
        m_TempRenderers = go.GetComponentsInChildren<Renderer>(true);

        for (int i = 0; i < m_TempRenderers.Length; i++)
        {
            m_TempSharedMaterials = m_TempRenderers[i].sharedMaterials;
            for (int j = 0; j < m_TempSharedMaterials.Length; j++)
            {
                if (m_TempSharedMaterials[j] == null)
                    continue;

                if (m_TempSharedMaterials[j].shader == null)
                    continue;

                m_TempShader = Shader.Find(m_TempSharedMaterials[j].shader.name);

                if (m_TempShader != null)
                    m_TempRenderers[i].sharedMaterials[j].shader = m_TempShader;
                else
                {

                    ClientMain.LogError("shader not found!!! - " + go.name + " : " + m_TempSharedMaterials[j].name + " : " + m_TempSharedMaterials[j].shader.name);
                }
            }
        }
    }

Hi jabi. I tried to write a test similar with your describe, but I didn’t get what you got. Can you send us a small project which can reproduce your problem, so we can investigate it.

Hi~… YinXiaozhou!!!..
Thank you for your interest in giving.

My Bundle count is 157…

Are randomly packaged incorrectly :sad::sad:

Yesterday… i build all bundle(mayby. all make bundle):sad:

One file is faulty packaging (quantity seems to be randomly generated)

I will send your email…(file name “bundle.zip”… so 2 files)

  1. InCorret_04_Emperor_Archer_Keiberth : wrong package bundle
  • file size 339kb
  • step
    – build all
    – build success
    – size wrong…
    – bundle load fail(random unity crash)
  1. Correct_04_Emperor_Archer_Keiberth : fine package bundle
  • file size 4.27mb
  • step
  • Select InCorret_04_Emperor_Archer_Keiberth
  • delete bundle include
    – Select a prefab in the project view
    – bundle window->build selection
    – fine build

I hope the bugs are being fixed:):slight_smile:

Hi, a new version of BundleManager is now live with new features, fixes and a new tutorial!