Getting Laser Defender to work in Web Build and Resolution Question

Hi all! After getting my block breaker game to run well in the web build, and having no issues so far with my Glitch Garden game, I was wondering if someone might know how to get the resolution for the 9:16 aspect ratio of the Laser Defender game to stay locked in the correct ratio. I’ve been messing around with it for hours over the course of days and my web searches aren’t coming up with anything satisfactory. The closest I’ve got to it running like it does in the editor is resizing the window myself post-build.

Just as well, but seemingly unrelated, I can’t get my game to run as a web build. Getting this error when trying to run it via :


I haven’t tried to upload to, but I imagine it’d be a similar issue. Error code in console is:

exception thrown: RuntimeError: memory access out of bounds,RuntimeError: memory access out of bounds


Please follow Rob’s instruction: WebGL Debugging

Were you able to spot an issue that makes sense in the console?

Thanks! Going to re-do the build and see what pops up.

Getting this repeating in the console. Would like to note however that the game is now running locally with the dev build.

(Filename: currently not available on il2cpp Line: -1)
UnityLoader.js:1043 NullReferenceException: Object reference not set to an instance of an object.
UnityLoader.js:1043   at ScoreDisplay.Update () [0x00000] in <00000000000000000000000000000000>:0 

I encountered an issue with this error before, but the alternative was leading to an even worse bug. Has something to do with the ScoreDisplay updating. The score still updates just fine however. May have to do with the game session not destroying on load. I’ll try to upload my code.


After months of coming back to the Null Reference issue and looking through every related question on Udemy,, and other sources, I finally found out that I added ScoreDisplay to the GameSession object and it was trying to pull a text component from there. I’m not sure why I did, months ago, but it was literally the only step I took that didn’t line up with the Rick’s steps. Going to try to get the Web build working now, hopefully in the correct resolution.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms