Everyone seems to be getting this error, including me. It is also missing the “score” and “lives” text that I put at the top. I think something is wrong with the Level Manager, and I may have to go through it line by line to see what’s wrong. It works in unity, but it seems to be broken post build.
I’m using Unity 5.5 on a Mac with MonoDevelop 5.9.6
Everyone seems to be getting this error, including me. It is also missing the “score” and “lives” text that I put at the top. I think something is wrong with the Level Manager, and I may have to go through it line by line to see what’s wrong. It works in unity, but it seems to be broken post build.
I’m on my.mobile at the moment so can’t check to see but often one issue with missing scores texts is that the UI.Text object wasn’t wide enough to fit it all in. Just a thought.
These two game objects are tagged as Editor Only, this means that they’re not included in an actual build, so when the engine tries to execute this line (#36) in the LevelManager script:
livesTxt.text = "LIVES: " + lives;
it stops the execution with an exception, since livesTxt is Null.
Revert them to an Untagged tag (for all levels) to fix them.
Pro-Tip: when testing actual builds outside Unity, always try first with a PC/Max/Linux .exe, it builds faster and you can activate the Development build - if an exception is thrown, you’ll get a Show Log button inside the .exe which you can use to actually read where the bug is encountered. You can use the dev build for a WebGL build ofc, but it builds a lot slower than the .exe (converting to Java is sooo slow).