Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question Load Addressable Scene in Edit Mode

Discussion in 'Addressables' started by Swiftle, Apr 22, 2024.

  1. Swiftle

    Swiftle

    Joined:
    Feb 11, 2014
    Posts:
    41
    Hi, is there a way to load an addressable scene in Edit Mode by using EditorSceneManager.OpenScene?
    I'm trying to make our environment scenes addressable to reduce build size and it's been working great so far for play mode. However I would also want to be able to visualize the scenes in Edit Mode. I tried using LoadSceneAsync but it doesn't work in Edit mode. I tried using LoadAssetAsync<SceneInstance> but it cannot be used with stream scene Asset Bundles.

    I feel like this workflow isn't really supported but I wanted to see if someone else had similar experience.
     
    Last edited: Apr 22, 2024
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,011
    You can just open it normally. There's nothing special about opening an addressable scene in the editor. At runtime you can load them normally via the addressables API.
     
  3. Swiftle

    Swiftle

    Joined:
    Feb 11, 2014
    Posts:
    41
    Sorry I forgot to mention something very important. The scenes are part of project A and are being loaded into project B. So in Play mode, I'm able to load the scenes just fine. However I'm trying to figure out a way to have them visible in Edit Mode as well. Since the scenes are not part of Project B, I need to load the Asset Bundle and open the scene however I don't think such workflow is supported.