Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Any Tips When Converting to Addressables?

Discussion in 'Addressables' started by Greyborn, Sep 10, 2019.

  1. Greyborn


    May 26, 2016
    Hello everyone! We are about to convert our game to use Addressables with the primary goal of making our update patches as small as possible (it’s become a needed requirement for our console ports). All our content will be local on the installed device.

    Our current plan is to turn as much of our game’s content and scenes into Addressables as possible so that only really code and one “boot” scene is left in build settings.

    The main types of things we plan to turn into Addressables include:
    · Unity scenes and lightmaps
    · Key gameplay balance data files
    · Content prefabs and their assets (environment props, characters, projectile vxf, and related)
    · Music tracks
    · Shaders
    · UI prefabs and scenes

    Again, the primary goal is to reduce any future patch sizes to be as small as possible and all the Addressables will be stored locally with the game. Also, we’ll be staying on 2018 LTS for this project.

    Any tips/gotchas we should be aware of that anyone would like to share before we dive into this work? Thanks!
    BTStone likes this.
  2. Favo-Yang


    Apr 4, 2011
    2 cents,
    • The importer can help you import existing assets quickly.
    • The preload approach, can help you avoid migrating existing codebase to a fully async style. No example code yet, but I stretch out the basic idea in the thread.
    • The content update workflow, is designed for your case, so you may want to read it carefully. The docs may seem complex, but what it does is quite straightforward. It compares assets with last release state and generate the patch bundle for you.
    Those are general advices. However I'm not working on a console game, but a few folks do in the community, so...
  3. Greyborn


    May 26, 2016
    Thanks Favo-Yang, we'll check that stuff out!
  4. Dahku


    Jan 30, 2013
    Bit of a necro-bump here as we find ourselves in the same boat. Structurally speaking our game has been finished for awhile, and we've never worried much about Asset Bundles; Unity users all seemed to agree they were a nightmare to work with, and we've had no need for their commonly touted perks... and then came console updating.

    We've got a fully functioning game based on Unity's natural way of doing things (don't even use the Resources folder but for one tiny thing). Most guides and documentation for Addressables seem to approach from the angle of remote servers, asynchronous loading, and memory management, and the whole package feels like a supremely convoluted nightmare to wade through when all we want is for local content to continue working like it has been for years now while satisfying update needs.

    So, Greyborn, if you've got a moment we'd be very interested to hear how this has gone for you, and if you've got any other tips to share yourself we'd really appreciate it. :)
    BTStone likes this.
  5. ImproxGames


    Apr 3, 2017
    In our game we were in very similiar state. We resolved it by basicaly having only one scene in the actual build settings and in that scene is few preloading things for code that would require major refactoe to work async. Then every actual scene loading is handled by addressables. We didn't have to change any prefab or other type of asset loading to addressables with this approach. We were just required by our platform choices to minimize patching and single file sizes.

    There is one problem with this tho that was easy but hacky to fix. Due to the above issue when in editor loading a single scene we run into issue of those preloaded assets not being preloaded in time (alot of the dependency code was already used in awakes for example. I resolved it by getting the direct asset referencee that is editor only in the Asset Reference class and used #if UNITY_EDITOR to basicaly prefill those dependencies only in editor, so far this solution has solved the issue for us, and without impacting other aspects of the project.
    Dahku likes this.