1. Enter the Microsoft Developer Challenge for a chance to win prizes. Read more about it here.
  2. Enter the Google Play Indie Games Contest in Europe. Read more about it here.
  3. Unity 5.5 is now released.
  4. Become a closed-alpha partner on the new Facebook games platform. Read more about it here.
  5. Get early access to our Google Daydream Technical preview. Click here for more details!

Build asset bundle .unity3d

Discussion in 'Editor & General Support' started by yogeez, Sep 2, 2009.

  1. yogeez


    Mar 4, 2009
    hi, all
    Recently checked with the unity asset bundle example. The import thing is understood. But how about the build of the asset bundle done, its not given brief anywhere or i am not able to get to the right track.

    As i am creating the build from Unity app, by going to file menu and clicking on build settings and making a build (thou i think its not a proper way). But the problem is the file generated this way is different as per the file given with unity example of asset bundle, BOTH HAVE THE SAME EXTENSIONS .unity3d

    So how to build that unique asset bundle file with the commandline or script integration to add objects in the build. to get the .unity3d asset bundle file

    Any detailed example for the build in this case ?
  2. Dreamora


    Apr 5, 2008
    asset bundles are build through editor scripts you write.
    The asset bundle example actually contains two which should do all what you need and offer a good base for more sophisticated scripts.

    keep in mind: asset bundles can not contain script code! script code must be contained in the application itself
  3. yogeez


    Mar 4, 2009
    Thanks dreamora, yaa the said part by you is ok.

    But the thing i was asking is "So how to build that unique asset bundle with integration to add objects in the build. to get the .unity3d asset bundle file "
    And in the example i don't see any exampled app to generate the asset bundle build.

    Also do you mean to make an asset bundle, through command line arguments to create a build. If yes than how can that be accomplished ?

    And that build will be asset bundle having .unity3d file as extension ?
  4. whgandalf


    Nov 20, 2009
    Is not hard to create and asset bundle. First of all, you have to have the \Assets\Editor\ExportResource.js file also \Assets\Editor\AutomatedExportResources.js, then you create the graphic components and save them into a prefab.

    then you select that prefab on the project section and go to Asset->Build AssetBundle From Selection... there you choose the output path and thats all.

    you will have a valid .unity3d asset bundle.

    That's the way I do it!

    Attached Files:

  5. yogeez


    Mar 4, 2009
    came to know the same that you told, and worked up a while ago on it.
    still thanks for reply
  6. IPete


    May 15, 2008
    Hey guys,

    So the bit which Dreamora said about not being able to include script code in the asset bundles... I assume that if I attach a script to an object that would not come across in the asset bundle???

    That does seem a little limiting. Am I right in assuming that for example I could therefore not have some new characters with AI attached as part of an asset bundle?

    Any thoughts please?
  7. dkozar


    Nov 30, 2009

    can someone, that had been working extensively with asset bundles, share a few toughts? Thanks in advance...

    - as I figured out, when asset bundle is exported, it doesn't work in other projects (as expected), but only when loaded by the one by which it is created (because of the script references, etc.)
    - when loaded from another project, the scripts are missing (also some people say colliders, textures, lightmaps(!))
    - does it mean that I can't separate project "levels" or "sectors" into different Untiy projects and delegate them to different people?
    - the motivation for this is that now we got a one gigantic project (many hundreds of MB in size) which contains both code and assets, so any wrong move could put you into situation of waiting assets to be rebuilt (cca 2 hours)
    - the other motivation is to delegate work and the responsibility for different parts of design (considering the *package* or *asset bundle* as an output of the artist)
    - I've seen people loading scene parts as separate asset bundles, but keeping one gigantic collider in the main project, which covers the whole level. Is this the only way to do it? Does it mean that when a new sector/or level is added to the application, the application itself has to be rebuild because of this collider, the new version of it has to be published online, the people have to download a new version... sounds crazy.. :confused:
  8. minevr


    Mar 4, 2008
    I make a tool, find my asset folder all *.fbx fils,write a cmd list text..

    Attached Files: