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

Hitches during async addressables loading

Discussion in 'Addressables' started by isaac-ashdown, Jun 6, 2020.

  1. isaac-ashdown

    isaac-ashdown

    Joined:
    Jan 30, 2019
    Posts:
    69
    Hello,

    We have a game with two main views: a terrain-based map view where the player explores a map, and a 2d event view where a player interacts with locations. We build these events by layering many sprites together based on the type of terrain the player is currently standing on.

    When the player interacts with a location, we fade out of the map view to black, setup the event layers, and fade back out. The events are basically a set of prefabs that are all instantiated together, often something like 3-5 prefabs each with about 20MB of textures to load. Textures are large but crunch compressed, as the game is designed to be played in 4K resolutions.

    To speed this up, we use addressables for these prefabs, and when the player clicks the button to interact, we immediately begin async loading the addressables during the fade-in. Once the fade-in has finished, we instantiate the prefabs. This all works fine, but there are unfortunately hitches during the load process as you can see in this profile (and are noticable during the fade-in):

    upload_2020-6-6_12-32-15.png

    When we transitioned to this method, I was hoping that the addressables async loading would be hitch-free. Was this a mistake? Is this the expected behaviour of loading addressables?

    You can find the full profile here: https://drive.google.com/file/d/1pJV0GZRwvRJnVssm0GJP0GqHrNVUIe3G/view?usp=sharing

    Note we have incremental GC enabled. We use these addressable settings:

    upload_2020-6-6_12-38-35.png
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    I'll kick this over to team to review. Which version of Addressables are you using?
     
  3. isaac-ashdown

    isaac-ashdown

    Joined:
    Jan 30, 2019
    Posts:
    69
  4. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    Gotcha. Try upgrading to 1.11.2 - that should resolve this.
     
  5. isaac-ashdown

    isaac-ashdown

    Joined:
    Jan 30, 2019
    Posts:
    69
    Thanks, but to clarify - does 1.12.2 fix the hitch described on this thread, or the slow playmode from the other thread?
     
  6. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    This is a fix for the slow playmode from the other thread.