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

Question Recommended method for working with AssetBundles while in editor?

Discussion in 'Asset Bundles' started by madGlory, Dec 8, 2020.

  1. madGlory

    madGlory

    Joined:
    Jan 12, 2016
    Posts:
    44
    I am new to asset bundles and have just finished the tutorials for how to make them work. Great! Assets from AssetBundles load and we can use them in game.

    Now we are at the next step. We have found that editing assets in AssetBundles does nothing unless you rebuild the AssetBundles. This is a highly impractical work flow as we need to make many changes to the assets at this moment and can't afford to keep rebuilding the AssetBundles between every minor change.

    What is the recommended method for updating AssetBundles that contain assets that will change very often (while in playmode or otherwise in editor.)

    Any help would be greatly appreciated!
     
    antoined73 likes this.
  2. antoined73

    antoined73

    Joined:
    Feb 23, 2014
    Posts:
    24
    Up !

    I also have the same question.
    Before, I loaded my assets via Resources folder, so in devlopment and production, there was no difference when loading the assets and any changes mades on the assets in development were immediately seen in the editor when playing the scene.

    Now, at each assets changes, it forces our team to make the build of the bundles each time before testing our scene again.
    The only idea I have is to keep my assets in Resources folder when I am in devlopment.
    Then, when I want to make a build, I rename the Resources folder and build my asset bundles.
    Of course, the loading code would be like :
    Code (CSharp):
    1.  
    2. #if UNITY_EDITOR
    3. //Load assets from Resources folder
    4. #else
    5. //Load from asset bundles
    6. #endif
    7.  
    Some more ideas on how you folks managed it would be greately appreciated.
    Thanks :)
     
  3. madGlory

    madGlory

    Joined:
    Jan 12, 2016
    Posts:
    44
    We ended up switching to addressables to solve this problem.
     
  4. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Sorry, late to the thread. My asset AutoBuilder lets you build bundles and use them in the editor. That alone is not unique, but the thing that is unique is it can create a differential bundle that is only the things you've changed since your last full bundle build. This override bundle scoops up any dependencies, and is fast enough that it's bound to a hotkey for launching the game after making the bundle. So it's one keystroke and just a couple of seconds if you're modifying assets.