- Home /
Why is my canvas not going away on scene load in build, but is in editor?
I've been putting together a game with different canvases in each scene. When I run the game in the editor the UI changes between scenes just fine, but when I made a test build the canvas from the first scene persists into the second. Why is this happening in the build version?
Recording: https://youtu.be/j09tODcwyHw
So I was tweaking some stuff this morning and figured out that the UI in the new scene just doesn't show at all, even if I destroy the canvas object in the previous scene. I double checked and both the canvas and gameobject are enabled. Any ideas why I'm only getting this behavior in the standalone build?
Please, show some info of your project, like the "Build settings" windows and the code that loads the new scene.
Also, try building in Development mode to see if there's any exception being thrown.
Answer by illogicalcrow · Mar 14, 2015 at 04:08 PM
I was experimenting with some things and it seems having the main camera output to a render texture was causing the problem. I have no idea why this is fine in editor, but breaks the whole UI in build.
Thanks to DiegoSLTS! Your suggestion to use development mode let me see the error
releasing render texture that is set to be rendertexture.active
when transitioning from the scenes with broken UI to those that were fine. The error message wasn't showing in editor either, so if anyone can clue me into why there's a discrepancy or the parts of the manual/scripting api I missed that would be wonderful.
Answer by nextage575 · Nov 19, 2019 at 06:27 AM
Check you camera settings as well ,i had same problem because i set the camera on Don't Clear , when i set it back to Skybox issue been resolved.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
GUI Question 0 Answers
GUI not working in Build? 1 Answer
UI Constant Physical Size, rect sizes not corresponding to real sizes 0 Answers
OnGUI() works in editor, but not in build with an odd twist! 2 Answers