Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Asset Bundle Creator - [DISCONTINUED]

Discussion in 'Assets and Asset Store' started by NiklasBorglund, Mar 19, 2013.

  1. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    $AssetBundleTutorial.png

    Asset Bundle Creator is not being actively being developed and should be considered as discontinued.

    Asset Bundle Creator is released!

    Asset Bundle Creator is a plug-in for Unity Pro which provide its users an easy and convenient way to create Asset Bundles.

    By simply selecting a specified folder and pressing 'build' the plug-in, Asset Bundle Creator will create Asset Bundles out of each sub-folder in your specified folder.
    $screen0.png

    Video Tutorial


    Github: Link to Github project

    If you have any comments, feature requests or bug reports, just reply to this thread or contact me on twitter

    EDIT: The project is now only available on github.
     
    Last edited: Jun 18, 2015
    twobob likes this.
  2. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    496
    hi,

    I really need your package,but i am not programmer,so i am using playmaker

    Your tool have playmaker support?

    Dev
     
  3. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    I have no experience with playmaker, but i can't see why it shouldn't work. As I see it, building the asset bundles shouldn't be any different than it is in my plugin. Just use it like I show in the video tutorial.
    It's the loading of the bundles that might differ with using playmaker rather than writing a solution directly in C#.

    I skimmed through some of the forum threads on the playmaker forum and this unityforum, and it seems like people have been loading asset bundles with playmaker. So maybe you can find a way to load asset bundles on their forum.
     
  4. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    496
    hi,

    thanks for reply,i buy your package very shortly.

    dev
     
  5. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Thanks! Just let me know if you have any other questions :)
     
  6. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,137
    Simple, clever, useful,...
    All what I like !!!
    Congratulations !
    6R
     
  7. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Thanks! I'm glad to hear that :)
     
  8. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    A new update is submitted (1.01).
    NEW: Added a toggle button which lets you decide whether or not to force your folder names into lowercase letters.

    $lowercaseButton.png

    This update will be available for download within a few days.
     
  9. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,291
  10. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Thanks!

    Both yes and no. That example scene from unity is used for a very specific purpose. The similar thing between them is that they create asset bundle based on what is in the subfolders - but they do that in a completely different way(according to me).
    I'll try and explain the differences.

    The Character Customization sample makes you follow a specific naming convention. That example finds and take each submesh in the model-file, creates an asset bundle for each and every one of them along with the correctly named textures.
    Then the character generator they use, combines the meshes(according to your 'settings') and patch it together to be used as a character. It also uses predefined settings when building the asset bundles.

    The Asset Bundle Creator is used more generally. It let's you specify a folder where you put your subfolders. Then it creates an asset bundle for each subfolder, with any type of asset bundle settings you desire. It does not require you to follow any naming conventions, it does not split up any model-files into separate bundles - it takes all the assets in a folder and builds a single asset bundle from it, according to your settings in the editor window.

    I hope that clarifies it. Let me know if you have more questions :)
     
  11. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,291
    Thanks for the reply Niklas,

    We're trying to make a character customization type of project with asset bundles and was wondering how we can best leverage your plugin. As you explained Unity demo project is very specific in splitting up a character into components and patching them together in the game engine. Your plugin is more general in what in can do. The question is how to use your plugin to do something like the character customization project.
     
  12. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    It is definitely possible, but you'll have to split the models into meshes/prefabs yourself and put them in the subdirectories. So to make it work exactly like the Character Customization example will require some work from your side.
    I could, however, make an update with an option that mimics the behavior from the example, if there's a common interest.
     
  13. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,291
    Sounds great,

    We would like to vote for this feature. I think your assetbundle tool would be very flexible and useful if it also has the ability to do character customization. If you add this feature, we would buy right away.
     
  14. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    496
    character customization :D
     
  15. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    I'll do some research and see if I can find a good enough solution and still maintain the simplicity of using it.


    Version 1.01 is now released!
    NEW: Added a toggle button which lets you decide whether or not to force your folder names into lowercase letters.
     
  16. xKroniK13x

    xKroniK13x

    Joined:
    Jun 19, 2012
    Posts:
    164
    Hi Niklas, great asset... however, I am having a compilation error when compiling to Android or iOS... these are what I am getting:

    Code (csharp):
    1.  
    2. Assets/BundleCreator/Scripts/UndoManager/HOEditorUndoManager.cs(3,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    3.  
    and
    Code (csharp):
    1.  
    2. Assets/BundleCreator/Scripts/UndoManager/HOEditorUndoManager.cs(3,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    Any help would be very appreciated! Thanks!

    EDIT: Fixed the above error by moving UndoManager into the Editor folder... however, I now get this one.
    Code (csharp):
    1. Assets/BundleCreator/Scripts/LoadAssetFromBundle.cs(155,22): error CS0103: The name `baseURL' does not exist in the current context
     
    Last edited: Apr 4, 2013
  17. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Yes, you're right. The undo manager should be in the Editor Folder, don't now why i put it there.

    For the error in LoadAssetFromBundle.cs, this should to the trick:
    Change this(at the beginning of the class):
    Code (csharp):
    1. #if UNITY_EDITOR
    2.         public string baseURL = "file://";
    3. #elif UNITY_WEBPLAYER
    4.         public string baseURL = "ONLINE_URL_HERE";
    5. #endif
    To this:
    Code (csharp):
    1. #if UNITY_EDITOR
    2.     public string baseURL = "file://";
    3. #else
    4.     public string baseURL = "ONLINE_URL_HERE";
    5. #endif
    I don't have Unity iOS or Android to test it, so please let me know if it worked and I'll implement it in the next update.
     
  18. xKroniK13x

    xKroniK13x

    Joined:
    Jun 19, 2012
    Posts:
    164
    That did the trick! Thank you very much.
     
  19. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    217
    NiklasBorglund,

    are you gonna update this fix into the package please ???

     
  20. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    674
    hi,

    i'm waiting too.........because i'm also play maker user.we need it this plugin in play-maker. Because right now not any plugin for striming with play-maker supported.
     
    Last edited: Jul 22, 2013
  21. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Yes, sure(I forgot - sorry). I'll look into it tomorrow and see what I can do :)
     
  22. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    There, version 1.02 is submitted to the asset store. It only contains this fix. Should be up on the asset store within a couple of days.

    Until then, I've attached that class into this post so that those who want it can just replace this with the one in the package.
    View attachment $LoadAssetFromBundle.cs

    Again, sorry for the delay.
     
  23. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Update 1.02 is now live on the asset store with the mentioned update.
     
  24. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    496
    Hi,

    if Asset bundle is loading background.
    Can I click any button or play any animation?

    Dev
     
  25. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    I'm not entirely sure i know what you mean. If you are referring to if you can do other things while you are loading an asset bundle, then yes - but only if you are loading them asynchronously.
     
  26. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    I thought I would write a heads up message to everyone using Asset Bundle Creator.

    First of all, thank you for all your feedback and comments! They have been very helpful to me :)

    Secondly, sorry for the double post.

    Unfortunately, the company(Cry Wolf Studios) I released this plugin under will cease to exist within a week or two.( i.e. the company will be liquidated).
    This means that I will remove the plugins from the unity asset store within a week from now.

    However, I do still own both of the plugins that we released - so I have created repositories for both of them on Github and placed the projects under an MIT-license. This basically means that you can download it /fork it/ change it etc. in any way you want as long as the license header is intact.

    Sorry for any inconveniences caused by this.
     
  27. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Niklas,

    I download this fantastic asset. I hope you will Not delete from store :)

    However as I read in asset store comment, by default, if you not override buildTarget, Unity automaticcaly switch buildTarget platform to WebPlayer.

    To fix this issue I replace in CreateAssetBundles.cs:

    Line 369:
    Code (csharp):
    1.  
    2. if (!BuildPipeline.BuildAssetBundle(null, toInclude.ToArray(), bundlePath, buildAssetOptions, ))
    3.  
    with:
    Code (csharp):
    1.  
    2. if (!BuildPipeline.BuildAssetBundle(null, toInclude.ToArray(), bundlePath, buildAssetOptions, EditorUserBuildSettings.activeBuildTarget))
    3.  
    Thanks :)
     
  28. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262

    Sorry for the late answer.

    I'm glad you like the asset! Unfortunately, it's now removed from the store. But it is still available under an MIT-license on github.

    Yes, that's one way to do it. The problem is if you want to rely on that you as a developer switches to the correct platform manually each time when building bundles, or if you want the plugin to do it automatically from your saved settings(in case you switched by accident).
     
  29. GMAlfonso

    GMAlfonso

    Joined:
    Feb 10, 2014
    Posts:
    4
    Hi

    I'm trying to build it in my android phone but nothings showing. :(
    I uploaded the bundle from a site and my plan is to download the bundle and show it.

    what script should I use? (LoadAssetFromBundle,LoadBundleScene,MyNewScript,AssetBundleManager)
    HELP!!!
     
  30. GMAlfonso

    GMAlfonso

    Joined:
    Feb 10, 2014
    Posts:
    4
    how can it run in android or IOS?
    It doesnt load my asset bundle :(
    HELP!!!!!!

    #if UNITY_EDITOR

    public string baseURL = "file://";

    #else

    public string baseURL = "http://mydomain.com/MyAssets/";

    #endif
     
  31. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    The main task of the asset bundle creator is to create asset bundles in an easy way. The scripts of loading the bundles are only examples on how you could do that.
    You should be able to see how the example bundles are loaded in the script LoadBundlesScene.cs. You can also look in MyNewScript.cs and read all the comments I wrote there for a better explanation on how the loading scripts work.

    Other than that, you need to give me some code or at least tell me what you have tried before I can help you.
     
  32. VamshiKrishnaP

    VamshiKrishnaP

    Joined:
    Jan 17, 2013
    Posts:
    16
    Hi All,

    Is there anyway to create an Unity's assetBundle without using Unity ?

    I want some other ways to create assetBundle without Unity.

    I have a project like that.

    Can anyone help ?
     
  33. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262

    Hi,

    I think it will be difficult for you to disregard unity completely. My best guess would be to use command line arguments to make something like that.
     
  34. inianbharathi

    inianbharathi

    Joined:
    Sep 26, 2013
    Posts:
    6
    hi i downloaded ur files from gift hub but i dont know how to import it in unity.it doesn't open like scene,I cant set it as project , sorry i am new to unity ..can u describe about how to add this tool to a project

    ·
    [​IMG]
    [​IMG]
     
  35. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Hi,

    This is how i usually do it:

    1. Open Unity
    2. Create a new project
    3. Find the "Assets" Folder in your new project
    4. Copy/Paste the AssetBundleCreator classes into the assets folder
    5. Done
     
  36. lilboylost

    lilboylost

    Joined:
    Feb 12, 2014
    Posts:
    254
    Can I use it to create bundles programmatically instead of using Editor window? I can set all desired properties programmatically which need to be filled into the editor. Any help will be appreciated.
     
  37. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    No, looking at it now, I'll think you'll have to use the EditorWindow. Not the best solution, I agree.
    But you could use the editor window along with the methods of the CreateAssetBundles.cs class, and close it immediately after.

    Another solution is to extract the settings in the Window(the ones that is being set with editorprefs) and use that with the createassetbundles class.

    Hope that helps
    /Niklas
     
  38. lilboylost

    lilboylost

    Joined:
    Feb 12, 2014
    Posts:
    254
    Thank you for your response. You are correct, it need to be done in Edit Mode. I moved all my play-mode code into your Editow window class "CreateAssetBundles.cs" as you mentioned. It is a great plugin, thank you for sharing it. I was able to hook into the code and support my use case of encryption. Now I can

    1) Build a bundle supporting recursive files on selected directory.
    2) Encrypt the bundle
    3) Build a new bundle from encrypted bundle
    4) Copy encrypted bundle to my shared folder

    - all with one click. All because your code is well documented and nicely written. Once again thank you for the great plugin and great support.
     
  39. nhimmisha

    nhimmisha

    Joined:
    Nov 26, 2013
    Posts:
    4
    Great plug-in! Any idea about CRC support in bundleControlFile?
     
  40. VamshiKrishnaP

    VamshiKrishnaP

    Joined:
    Jan 17, 2013
    Posts:
    16
    Hi, we have a project developed with Asset bundle's loading on the fly.
    Every time we are changing the asset bundles when unity version is upgrading.
    can anyone help how to create an asset bundle for all versions of unity3D ?
    Thank you !!!
     
  41. Thorgron

    Thorgron

    Joined:
    Mar 17, 2015
    Posts:
    1
    After a day of trying i can't get this to build the Bundle i keep getting the error massage:
    "Specified 'AssetBundles folder' does not exist! Open Assets->Bundle Creator->Asset Bundle Creator to correct it
    UnityEngine.Debug:LogError(Object)
    CreateAssetBundles:ExportAssetBundleFolders(AssetBundleWindow) (at Assets/AssetBundleCreator-master/Scripts/Editor/CreateAssetBundles.cs:188)
    AssetBundleWindow:OnGUI() (at Assets/AssetBundleCreator-master/Scripts/Editor/AssetBundleWindow.cs:109)
    UnityEditor.DockArea:OnGUI()"

    I have manually made the folder it is looking for but it is still not seeing it. What can i do to fix this?
     
  42. surfer45

    surfer45

    Joined:
    Apr 2, 2015
    Posts:
    1
    "Specified 'AssetBundles folder' does not exist! Open Assets->Bundle Creator->Asset Bundle Creator to correct it
    UnityEngine.Debug:LogError(Object)
    CreateAssetBundles:ExportAssetBundleFolders(AssetBundleWindow) (at Assets/AssetBundleCreator-master/Scripts/Editor/CreateAssetBundles.cs:188)
    AssetBundleWindow:OnGUI() (at Assets/AssetBundleCreator-master/Scripts/Editor/AssetBundleWindow.cs:109)
    UnityEditor.DockArea:OnGUI()"

    I am getting this same problem.
     
  43. sd19260227

    sd19260227

    Joined:
    Apr 5, 2015
    Posts:
    1
    I can not find inside Unity ( Assets > Bundle Creator) Why?
     
  44. ErmaKeef

    ErmaKeef

    Joined:
    Jan 1, 2015
    Posts:
    3
    How do you install this plugin? I am very confused.
     
  45. WhiteLotus

    WhiteLotus

    Joined:
    Mar 4, 2015
    Posts:
    7
    can i use your plugin to create assetbundel from Pc or mac os build(i mean from .exe or .app file)??
     
  46. StiflingHat9897

    StiflingHat9897

    Joined:
    Jul 27, 2015
    Posts:
    1
    I keep getting this error after the second time I used it.Specified 'AssetBundles folder' does not exist! Open Assets->Bundle Creator->Asset Bundle Creator to correct it
    UnityEngine.Debug:LogError(Object)
    CreateAssetBundles:ExportAssetBundleFolders(AssetBundleWindow) (at Assets/Scripts/Editor/CreateAssetBundles.cs:188)
    AssetBundleWindow:OnGUI() (at Assets/Scripts/Editor/AssetBundleWindow.cs:109)
    UnityEditor.DockArea:OnGUI()
     
  47. zykrah

    zykrah

    Joined:
    Sep 2, 2016
    Posts:
    2
    For everyone getting these 2 errors: Specified 'AssetBundles folder' does not exist! Open Assets->Bundle Creator->Asset Bundle Creator to correct it UnityEngine.Debug:LogError(Object) CreateAssetBundles:ExportAssetBundleFolders(AssetBundleWindow) (at Assets/Scripts/Editor/CreateAssetBundles.cs:188) AssetBundleWindow:OnGUI() (at Assets/Scripts/Editor/AssetBundleWindow.cs:109) UnityEditor.DockArea:OnGUI()

    and

    AssetBundle Build Failed! - Please check your settings in the Bundle Creator at Assets->Bundle Creator-> Asset Bundle Creator. UnityEngine.Debug:LogError(Object) AssetBundleWindow:OnGUI() (at Assets/Scripts/Editor/AssetBundleWindow.cs:111) UnityEditor.DockArea:OnGUI()

    Simply create a folder named "BundleCreator" and place the asset bundle creator folders in it.
     
  48. zykrah

    zykrah

    Joined:
    Sep 2, 2016
    Posts:
    2
    Simply create a folder named "BundleCreator" and place the asset bundle creator folders in it.
     
  49. UnturnedLido

    UnturnedLido

    Joined:
    Nov 10, 2016
    Posts:
    1
    Ok so i have gone through every error listed here and fixed accordingly, got the plug in up and running but now I am running into a HUGE error.

    When ever i run my mod I get this problem with it being invisible in first person. Anyone have this problem? Solutions?

    PICS: http://imgur.com/a/MI3Ip
     
    Last edited: Nov 11, 2016
  50. Marsllzent

    Marsllzent

    Joined:
    Nov 26, 2016
    Posts:
    1