Skip to content

Build fails because of empty scene #302

@firatkucuk

Description

@firatkucuk

Bug description

Build fails because of empty initial scene value:

this is my EditorBuildSettings.asset file:

%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1045 &1
EditorBuildSettings:
  m_ObjectHideFlags: 0
  serializedVersion: 2
  m_Scenes:
  - enabled: 1
    path: Assets/Levels/Level1.unity
    guid: 2cda990e2423bbf4892e6590ba056729
  m_configObjects: {}

but in Builder.cs following line retuns an array of empty string ['']

var scenes = EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(s => s.path).ToArray();

I tried to print the exact values:

foreach (var xscene in EditorBuildSettings.scenes) {
  System.Console.WriteLine(xscene.enabled);
  System.Console.WriteLine(xscene.path);
}

The result is:

True

How to reproduce

Create a project with 2021.2.3f1 version and use and try to run github actions with default values.

Expected behavior

A Passing pipeline, I injected manually and it passes

var scenes = new[] { "Assets/Levels/Level1.unity" };

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions