Search Unity

Unity Cloud Builds don't load an initial scene

Discussion in 'Unity Build Automation' started by orionburcham, Jan 3, 2017.

  1. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    488
    Hello. :)

    I've recently run into a strange problem, in which Unity Cloud Builds complete successfully, but don't appear load an inital scene when run. This has shown up on both Mac and Windows platforms. I'm able to download and launch the executables just fine.

    When running these builds, I see the "made with Unity" splash screen, then an infinite black screen. My cursor is still visible, and responsive.

    To be clear, these problem doesn't show up in my local builds. The initial scene loads as expected in those.

    Also, the scene files are present in my BitBucket repo. No LFS is involved with these files.

    Has anyone run into this issue? I'm recently new to Cloud Build, and any help would be greatly appreciated. -Thanks!
     
    yaaragu likes this.
  2. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    488
    Alright, oddly this seems to have something to do with where the scene files are located.

    If I move them to a new directory ("Assets/Scenes/") Cloud Builds load them successfully.

    But that's not going to cut it- I need to be able to store scenes in deeply nested directories of the project.

    Not sure if this is a bug, or a restriction I don't know about.
     
  3. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    488
    Got to the bottom of this. Not a problem with Unity Cloud Build- but an editor issue. The Editor doesn't reliably save changes to a project's build settings when scene paths change (even if you manually save the project).
     
    yaaragu likes this.
  4. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    Hello! Glad you were able to solve your issue.

    For future reference (and for anybody coming to this thread with the same problem) make sure you add your scene files to the Build Settings, and that those changes are checked into source control.

    - Sophia
     
  5. yaaragu

    yaaragu

    Joined:
    Jan 15, 2017
    Posts:
    1
    Thank you for sharing. I had the same problem. I also noticed that the editor did not update project build settings. However, I am not sure how to "force" the editor to update it. How did you make the editor save?
     
  6. HermanTheMerman

    HermanTheMerman

    Joined:
    Dec 24, 2018
    Posts:
    3
    The problem is that your source control is ignoring .meta files. Go modify your .gitignore to not ignore .meta and it should sort out your problem