Search Unity

Marking asset as adressable taking too long

Discussion in 'Addressables' started by andre_unity573, Jun 6, 2020.

  1. andre_unity573

    andre_unity573

    Joined:
    Oct 17, 2018
    Posts:
    34
    Hi, I'm migrating our project from resources usage and regular asset reference to make a better support for our game to handle DLC, patches and such.

    I've read the documentation a bit and I'm not sure if I'm missing something, but without worrying about play mode or loading adressables in game, which is usually what I find searching for big loading times, I'm finding that my project takes very very long just to mark an asset as an adressable.

    Is there any ways to optimize in editor setting an asset as an adressable? Like, even if it be something as I checking several assets as an adressable one by one and then hitting something to compile/gererate the references I need to use it in play mode?
     
  2. andre_unity573

    andre_unity573

    Joined:
    Oct 17, 2018
    Posts:
    34
    Was running some tests and found out that if I set assets as adressables without having opened for the first time the adressables window it mark the assets without any delay/processing. After I open the Adressables window for the first time any time I change an asset to adressable it performs the necessary operations to gather the the data of the objects I believe. (When I first open the window it also takes a very long time which I believe is processing any operations that were made before opening the window)
    Here is a print of a profiling of the moment where I convert only one asset to an adressable:
    upload_2020-6-7_11-29-31.png
    Is there anything I can do to optimize this? I can send more info about the profiling and project if necessary.
     
  3. andre_unity573

    andre_unity573

    Joined:
    Oct 17, 2018
    Posts:
    34
    Ok, it seemed to be that it was because since I'm doing the migration between systems, having some assets still in resources was what was causing such a hugh loading time. Maybe it was the leveldata assets which contains references to most of prefabs of the game as I save them in a ScriptableObject and not in scenes which for some reason being in resources and not reference as adressables made the calculations much longer..
    I still accept more explanations if possible to help understand better why exactly this was an issue. Removing everything from resources seemed to do the trick and now the processing time is quite acceptable.