Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Subscene won't AutoLoad

Discussion in 'Entity Component System' started by Enoch, Sep 29, 2023.

  1. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    Hello,

    I am using 2022.2.2f1 with DoTs. I have a MainScene that has a subscene that is open and autoload is checked. This works fine when starting on the MainScene in the editor. I have a StarupScene that is supposed to load the MainScene. When starting from the StartupScene it will load the MainScene but when it does none of the Subscenes are open or AutoLoaded. Is there some other setting I need to check other than auto load scene? My MainScene needs the entities in these subscenes to function correctly.
     
  2. MatanYamin

    MatanYamin

    Joined:
    Feb 2, 2022
    Posts:
    109
  3. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    For whatever reason Scene loading is just not functioning like it should:

    "To load a scene, you can either use subscenes, or theSceneSystem API.

    If you use a subscene, when the AutoLoadScene field is set to true, Unity streams the referenced scene in when the SubScene component is enabled.
    "

    The subscene is enabled and the game object is active. It just isn't open no matter how I save the Main Scene. In the editor when I click the checkbox for opening it, it does load the subscene correctly. I just can't figure out how to trigger the load mechanism from code so that it works from a build. I have tried following the docs, which says I just have enable the subscene component. I have that component enabled and autoload set to true.
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    Have you overridden the automatic bootstrap?

    SubScene auto loading only works if the Scene is loaded after the world