Can't load scenes when exporting as android release, but they load when I use android debug

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By iama

So basically that’s the problem. I have a start scene that loads at the start of the game (this works in both debug and release, but I think it’s because it’s the default scene) and then when I want to load the game scene, it works on debug but not on release.

:bust_in_silhouette: Reply From: iama

Hey so I found the solution. The problem was that I was using “assert” for debugging, and apparently if you use assert, in release that line gets deleted, so it doesn’t compile anymore. And that line so happened to load scenes…
So basically, I only had to delete the assert function and everything worked great. There’s another way to do it where you store the function in a variable and then check the variable to see if it works with assert later, that way it will both work in debug and release.
I hope that if you had the same problem, this was useful for you!!