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 not working

Discussion in 'Editor & General Support' started by Ender314, Feb 15, 2012.

  1. Ender314

    Ender314

    Joined:
    Aug 12, 2011
    Posts:
    55
    Trying to figure out how to use asset bundles. I have downloaded the AssetBundle example from the Unity website. When loading it says it has to update to my current version of Unity (3.4.2), as expected. But when I try to run the sample in the editor I get an error like:
    Couldn't open file
    /MyCode/UnityProjects/AssetBundles/Assets/../AssetBundles/AdditiveScene.unity3d

    When I run it stand alone, i don't even get that error displayed, the button just doesn't do anything.

    Is there some file renaming I am suppose to be doing? I'm interested in loading added scenes (scene that where part of the initial build) from disk.
     
  2. Morning

    Morning

    Joined:
    Feb 4, 2012
    Posts:
    1,141
    Is that file even there?
     
  3. Ender314

    Ender314

    Joined:
    Aug 12, 2011
    Posts:
    55
    AdditiveScene.unity is there but its under the asset folder. Im not sure why it is looking there and for the file extension .unity3d. The other buttons try to load (from the same folder): Shared.unity3d, explosive.unity3d, lerpz.unity3d all of which dont seem to exist anywhere. Are they suppose to be loading from some kind of collective package? Im a bit confused.

    My final goal is to load a scene from disk that wasnt part of my original build.
     
    Last edited: Feb 15, 2012
  4. Fehr

    Fehr

    Joined:
    Mar 3, 2011
    Posts:
    23
    I thought I'd re-post what I wrote here:http://forum.unity3d.com/threads/123855-AssetBundle-example

    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.