Search Unity

Bug: Addressables "Virtual" mode causes hierarchy to collapse on Play Mode

Discussion in 'Addressables' started by dgoyette, Jul 25, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Bug report #1172252

    I'm trying to submit an actual bug on this, but the bug report system isn't responding properly. So I'll post this here for now, and update this post with the bug report number when it (hopefully) goes through.

    The behavior I'm seeing is that every time I enter Play Mode, the hierarchy view collapses. This is a very annoying behavior when working with a complex scene, as it means I'm constantly having to manual expand back down to the objects I'm working on every time I enter play mode.

    This is easy to reproduce on a brand new project (Unity 2019.1.10):
    • Add the Addressables package to the project.
    • Create some prefab, doesn't matter what, as far as I know. I just made a prefab out of a Capsule.
    • Open the Addressables window, create a new group, and drag the prefab into that group. (I also renamed the entry in this window to give it a simple name, but I don't know if that matters.) Here's what I had:
    upload_2019-7-25_15-59-43.png
    • Change the Play Mode Script to Virtual.
    • Choose Build -> Build Player Content.
    Now, at this point, any time you use Build Player Content, or simply enter Play Mode, the Hierarchy view will be collapsed down to the scene root.
     
    Last edited: Jul 26, 2019
    cLick1338 and aka3eka like this.
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Any chance this could get prioritized? It's still the case that literally every time I enter play mode, the hierarchy collapses, and any selected game objects become deselected. This is really painful when iterating on a single game object in a complex scene.
     
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    We'll look into this, but I'm not sure if we can fix it for virtual mode. The issue is that to do a build (which virtual mode does, it just doesn't write files), unity opens scenes in the build, processes them, then reopens what you had up. I believe this close & reopen is what collapses your hierarchy. So currently you'll see this entering play in virtual mode, and when building content. We'll look into it, but it might be something deep in how unity builds scenes that we can't easily go in and fix.

    In the interim, the workaround is to use fast mode, as this won't actually build scene data.
     
    cLick1338, aka3eka and dgoyette like this.
  4. melissae

    melissae

    Unity Technologies

    Joined:
    Dec 5, 2018
    Posts:
    9
    Due to other priorities we will not be addressing this issue at this time.
     
  5. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    No worries. I've actually switched to using "Use Existing Build" just to avoid running into weird build-only bugs, so the issue with virtual mode (Use Asset Database?) no longer affects me. Thanks.
     
  6. aka3eka

    aka3eka

    Joined:
    May 10, 2019
    Posts:
    32
    When do you plan to fix the issue? I mean, is it a week, month year?
     
  7. tomatohorse

    tomatohorse

    Joined:
    Oct 26, 2013
    Posts:
    13
    I am having my hierarchy collapse when entering play mode too. It's annoying.
     
  8. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    You noticed that you can avoid that by changing the "Play Mode Script" you're using? You might find one of the other modes works fine for you, and the others don't caause this collapse-on-play behavior.
     
  9. chungaflomper

    chungaflomper

    Joined:
    Apr 5, 2019
    Posts:
    1
    Same problem but im not using addressables. Any updates?
     
    Last edited: Aug 8, 2020
  10. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    If you don't have the Addressables package installed in your project, it's definitely something else causing this problem, and you're not likely to find an answer in this thread. You can look at whether you have some other package in your project causing this behavior. I'd recommend approaching it as I did: Start a new project, see if this is happening, then one at a time add package to your project until you see the problem occurring.
     
  11. sincerelysleepy

    sincerelysleepy

    Joined:
    Jan 15, 2019
    Posts:
    34
    I'm getting this whenever loading a scene....super tedious to deal with. I'm using Unity 2019.4.17f1
     
  12. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    I'm also running into this issue - it's extremely annoying.

    Unity 2020.2.4f1
    Addressables version 1.16.16