My GUI works perfectly when I hit the ‘play’ button in the editor, but whenever I build and run the game, I get graphical artifacts.
Specifically, old text and buttons don’t disappear from the screen when they are supposed to, they just stay there forever. The artifact buttons don’t do anything when they are clicked, but it is still very strange that the behavior changes when I build and run rather than play in the editor. Is this a bug in Unity?
I stumbled upon a workaround/kludge for this problem. I noticed that the problem only occurs in parts of the display that do not contain any cameras, so I added in an extra dummy camera that fills up the whole screen, is blank, and runs behind all the other cameras. That seems to resolve the symptom, at least.