question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails because of empty scene

See original GitHub issue

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" };

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
firatkucukcommented, Dec 5, 2021

Yes it’s solved, Gonna create a PR for gitignore.io, and If you want I can create a PR for checking meta-file existence to the unity builder? Apart from that mystery is solved. thanks guys.

1reaction
davidmfinolcommented, Dec 5, 2021

I’m not certain, but I suspect the problem is related to the missing .meta files. Any reason you’re not using .meta files in git?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question - WebGL build fails on empty scene - Unity Forum
WebGL builds always fail with emscripten_fastcomp_win on archive 'libcxx.a', but used to build successful with unity 5. Took weeks to search, ...
Read more >
[WebGL] Player build fails with an empty scene when project ...
1. Create a new project · 2. Import AR foundation package from package manager · 3. Switch platform to WebGL · 4. Build...
Read more >
Built empty scene, build log shows tons of assets included (not ...
Cause my assets folder is 100gbs in size. In my build settings, the only thing it is building is the empty scene, no...
Read more >
JavaFX Stage shows always empty scene - Stack Overflow
Using: IntelliJ IDEA community ide. Java JDK 9.0.1; Scene builder 9.0.1. I always get empty scene. Here is the fxml file code:
Read more >
2.3 Images: "image.rkt" - Racket Documentation
The image teachpack provides a number of basic image construction functions, ... Creates an empty scene, i.e., a white rectangle with a black...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found