[Solved] BlockBreaker

Hi guys, I hope you’ll like my version of Block Breaker!

EDIT: As you can see from the first comment there is an error when you miss the ball.

User Submitted Screenshot of Error - See first comment on this link

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

Full Log in the console on Chrome

I crashed -> some sort of java debug screen came up, was playing well, Nice game I’ll try again

crashed again this time I lost and it crashed, sorry but looks great

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.

Found the bug:

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).

2 Likes

THANK YOU SO MUCH!

Not only for finding the bug but giving me the tip about doing the quick build first. :slight_smile:

2 Likes

Privacy & Terms