Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

AssetBundle example

Discussion in 'Scripting' started by Ender314, Feb 17, 2012.

  1. Ender314

    Ender314

    Joined:
    Aug 12, 2011
    Posts:
    55
    Does anyone know where to find a simple tutorial on how to use AssetBundles (creating them, instantiating from them)? The example from the Unity main site simply does not work in with 3.4.2. Nothing loads when hitting a button, just various error messages.

    Essentially I want to load a scene (with potentially new prefabs), that was not part of my original build, from disk (i don't care about from the web etc). I know there is an issue with adding new compiled scripts, but lets say all the scripts needed are already part of the original stand alone PC build.
     
  2. Clockworkservant

    Clockworkservant

    Joined:
    Nov 15, 2010
    Posts:
    7
    Bump... yes, I am also having problems with the Asset Bundle example project. Running the Loader.unity scene and clicking on the first load button "Download Shared.unity" results in an error message which says it couldn't open the file at the <path>/AssetBundles/Shared.unity

    Anyone able to get this to work? It's pretty tough to learn the system when Unity's own example scenes don't function.
     
  3. Fehr

    Fehr

    Joined:
    Mar 3, 2011
    Posts:
    23
    Hey guys, you have to run the AutomatedExportResources.js Editor script first in order to generate the asset bundles, by right-clicking anywhere in the project window and clicking "Auto Build Resource Files".

    From there on out the filles that are not found, resulting in an error will exist, and the rest of the example should work as expected.

    You have to read through the code a little to figure that one out, its a shame there isn't a README.txt or better doccumentation in the example project.

    Hopefully that helps. :)
     
  4. diablo

    diablo

    Joined:
    Jan 3, 2011
    Posts:
    736