Search Unity

Using Addressable to save our lives.

Discussion in 'Addressables' started by chrisk, Dec 13, 2019.

  1. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Hi, my project size is huge, about ~100GB and it keeps growing. And Unity Editor keeps getting slower and I can't keep work like this. For example, reimporting the whole asset takes about half a day. If it happens, I have to call it a day.

    I tried to minimize the delay by dieting but there is a limit and it's really frustrating why I have to spend so much time managing resources instead of making games.
    Anyway, I came to the conclusion that the only way to make the Editor more responsive is to split the project into several smaller sizes. I already explained why it's necessary in this thread. https://forum.unity.com/threads/how-to-use-addressable-system-in-editor-script.715163/#post-5277948

    I was really stressed out but I recently found that Addressable can be the rescue.

    Using Addressable, I'm trying to divide my main project into several projects, i.e., 1. Map, 2. Character, 3. Items, 4. Common(scripts and art resources) and finally 5. the Main with 1,2,3,4, removed.

    The new workflows are as follows.
    1. Map project will only contain Static Scenes such as buildings.
    2. The Static Scenes in the Map project will be built with Addressables.
    3. The Static Addressable Scene is loaded into the Main project so that I can add dynamic scene elements into the Static Scene, such as vehicles, moving platforms, and etc.
    4. Likewise, Character, Items, Common projects are loaded into the Main project using Addressable.

    If everything works as above, my Main project will contain mostly scripts and some dynamic elements making very light compared to one Gigantic project. I know, it won't make compile faster but I'm sure it will make Editor much more responsive.
    I think there are more side benefits but I won't talk about it here.

    Anyway, for the new workflow to work, I need the following.
    1. Multiple Catalogs and they can be loaded into the Main projects.
    2. Load Addressables into the Editor, so that I can load Static Scene and add dynamic elements on top of it.

    I think Addressable is very flexible and powerful. I may already support the features or has most of the functionalities built-in but I'm not aware of it yet. If there is a way, please let us know, if there isn't, please add the support.
    If you can, it can be a lifesaver for us and I'll really appreciate.

    Thanks.
     
    Favo-Yang likes this.
  2. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    Very intersting idea. Sadly Addressable devs haven't responded.
     
  3. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Yeah, I suppose they are all taking the early Xmas break. And then, New Year break. Soon, they will all busy preparing for GDC and some cooldown time.. and then month-long summer vacation followed by Unite 2020 preparation.. and then some more cooldown time...and many small marketing tours in betweens... the cycle repeats.
     
    Last edited: Dec 21, 2019
  4. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Hey Unity, if you are still there, can you please answer?
    Is loading Addressable into the Editor on your roadmap? I split my main project into several projects now but I cannot edit the Static Scene project without loading them into the Editor.
    This is a show stopper and I'm stuck now.

    If it can be loaded, this technique can help a great deal who are working with large size projects like me.
    Unity Editor slows down as project size grows and it's really critical problem and I hope you already know the problem.
    And there is no good solution. Unity Editor is just too slow and not fit for large size project.

    I'm trying my best to work around the slow Editor and trying anything if it can help. I was really hoping Addressable can save our life and I'm almost there.
    I really hope you give a second look at my suggestion.

    Please help!
     
  5. AskCarol

    AskCarol

    Joined:
    Nov 12, 2019
    Posts:
    234
    Hey there

    Agreed that this is a good idea. And we are sorry for the delay in responding. The Addressables team is taking a look at this now and we will respond do you as soon as possible. Thanks for being patient.
     
    Orimay likes this.
  6. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Hi, thanks for responding.
    Please understand that I'm in such a pain working with a large project currently.
    I still think splitting the project into multiple projects is the best(only) way to make the project manageable until the Editor handles a large project.

    Besides, splitting the projects depending on the purpose makes a good sense even if the Editor can handle a large project. It lets you have people to work on a specific task, and it also provides more security, e.g., Map Designer does not need to have access to Characters and vice versa.

    As I mentioned, there are two problems to solve. I just want to make sure what I'm trying to do is clear.

    1. How to split the project into multiple projects and building the Addressable without conflict. I already find out that Unity can load multiple Catalogs but each Catalog does not know what other Catalog contains. There may be duplicates or conflicts. Right now, building multiple Catalogs without conflict is not an easy problem to solve. If there is a way to manage them, it will really be helpful. After all, one of the design goals of Addressable is to help to simplify and building large games. I hope you take a step further into supporting multiple projects. (snippet from Addressable presentation below)
    upload_2020-1-9_6-36-19.png

    2. Another one is to be able to load Addressable into Scene Hierarchy. I don't expect we can edit the loaded Addressable but just to be able to Instantiate them at least during edit time. And loading them into the Editor once will help speed things up so that it does not load again everytime we click on "Play" I think it might be doable already but I need Unity to enable them.

    I'll really appreciate your help and it means a great deal to me.
    Cheers!
     
    AskCarol likes this.
  7. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Let me toss out a few comments..

    For large projects, some things available today to help with that: Using a cache server (a real server is best, but having one on-machine is still good) can make a huge difference. In addition, in 2019.3 AssetDatabase V2 helps with importing issues and switching projects. And coming after that I believe there are even more improvements. Various teams at Unity (other teams than us) are working on ways to help support large projects.

    Now to your actual questions.
    1. splitting projects without issue being a hard problem: Yes, it is a hard problem. Unity is built to understand the given project, so if you make separate projects, and want some system to monitor all of them, it would have to be some app running outside Unity. Addressables won't be that. I believe we already have mechanisms to ensure things like the built in shaders bundle can be unique to each project, but in general this is a tough problem that will require manual effort. Yes, we could spend time as a company trying to make this easier, but splitting your project into multiple is a workaround for the real problem (large project support). Fixing the real problem (which multiple teams are working on) is the better course of action.
    As to your screenshot, addressables isn't connected to the efficiency of importing a large project. The bullet points there were about how to handle runtime. Doing a large project where everything is a direct reference from scenes, or is in Resources will not scale.
    2. when you build addressables in ProjectX, that puts the content into bundles. Bundles are read only. Now if you are in ProjectY, it is easy to be in play mode, and load those ProjectX assets into your scene. Because that's runtime, and that's what addressables does. However, if you are editing a scene, it doesn't really make sense to load an asset from a ProjectX bundle into a ProjectY scene you are editing. Putting something in a scene during edit time means it's in the scene, and the scene has a direct reference to it. which won't work if that thing is in a bundle.

    Sorry to not be more helpful, but some of what you are asking about goes against the core of how Unity Editor operates. Addressables is a (hopefully) helpful layer on top, but we can't change how scene editing works.
     
    EirikWahl and AskCarol like this.
  8. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Cache Server will help import faster but that's not why I want to split the project.
    Now that you mention the Cache Server and having an App outside of Addressable, I think the Cache Server can be that App. In order to manage conflict over multiple projects, you will need a centralized repository and Cache Server may be the answer. This is a slightly different topic but we've been asking some mechanism to share assets over multiple projects for some time anyway. You put your Addressable into Cache Server and pull from it as you need them.

    Regarding loading Addressable into Editor, I believe you mentioned it's on the to-do list and I'm giving you a good use-case. As I mentioned, I don't expect to edit them but at least just to be able to load them would be fine. If you can load during Runtime, why not at Edit time? Think of it as a non-editable Sub-Scene. Am I asking something out of the world that violates the core?
    Assetbundle is just a read-only downloadble asset to me and nothing more.
     
    Last edited: Jan 9, 2020