Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Build asset bundle .unity3d

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

  1. yogeez

    yogeez

    Joined:
    Mar 4, 2009
    Posts:
    129
    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

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    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

    yogeez

    Joined:
    Mar 4, 2009
    Posts:
    129
    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

    whgandalf

    Joined:
    Nov 20, 2009
    Posts:
    2
    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:

    w7a7n7g likes this.
  5. yogeez

    yogeez

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

    IPete

    Joined:
    May 15, 2008
    Posts:
    414
    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

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi,

    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

    minevr

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

    Attached Files: