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 not Auto-Loading in StandaloneBuild (2023.1)

Discussion in 'Entity Component System' started by prateek_unity650, Aug 21, 2023.

  1. prateek_unity650

    prateek_unity650

    Joined:
    Nov 11, 2021
    Posts:
    5
    Hi - I have an ECS project that works fine in the Editor (2023.1.9f1) Play Mode. The entities are baked via a subscene in my "TowerMap" scene, which is loaded by an initial "Login" scene. The entities load fine in Play Mode, but at runtime I am stuck at the following loop in my GameManager (Monobehaviour in the "TowerMap" scene that is outside the subscene):

    Code (CSharp):
    1. var em = World.DefaultGameObjectInjectionWorld.EntityManager;
    2. var boardQuery = em.CreateEntityQuery(new ComponentType[] { typeof(ExecuteGameBase) });
    3.  
    4. Entity executeEntity;
    5. while (!boardQuery.TryGetSingletonEntity<ExecuteGameBase>(out executeEntity)) { yield return null; }
    where ExecuteGameBase is added to one of the default entities in the subscene (by the ExecuteAuthoring script - see screenshot)

    Not sure if something different for building eCS - I found a couple of responses for older versions which advise using a buildconfiguration, but that doesn't seem to be the flow anymore?

    upload_2023-8-21_15-30-48.png
     
    Last edited: Aug 22, 2023
  2. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    288
    Unity 2023.1 does NOT support ECS, use 2022.3 instead.
     
    xVergilx likes this.
  3. tommy_mc

    tommy_mc

    Joined:
    Sep 10, 2016
    Posts:
    4
    Hi there I have this problem in ECS 2022.3.6f1 Too any solutions
     
  4. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    263
    Hi, anything in the
    player.log
    ?
     
  5. tommy_mc

    tommy_mc

    Joined:
    Sep 10, 2016
    Posts:
    4
    Hey yeah, managed to figure out we had a mono in the subscene that we were trying to access that was breaking things and I assumed it wasnt an issue as we were enabling the scene in the editor manually thinking that was a requirement for the subscene to be activated, i refactored things and all is working as intended now
     
    apkdev and Laicasaane like this.
  6. Sylafrs

    Sylafrs

    Joined:
    Jun 25, 2013
    Posts:
    53
    I have the same issue, when ENABLE_CONTENT_DELIVERY is defined in the playersettings.