Unity 5.2 Freezing when Resizing Game View after Play
Hi, I have this very particular bug happening and I wasted a lot of time and effort trying to identify what was wrong, and now I need to know if there's a fix for it, or it's at least a known bug.
What was happening is that I have implemented a "context menu" in my game with a world space UI Canvas(in summary: a canvas that appears when the user clicks on something), and when testing it, sometimes the Editor would just freeze and refuse to continue I had to "Force Quit" and restart the editor, and that meant losing changes to my scene. It kept happening and I go worried that this could affect the final product as well.
I started to comment code and try to insert log messages to identify in what point Unity was freezing, but nothing came up. I knew when I deactivated the context menu functionality it never happened. At some point I had the UI elements doing nothing but just existing, and at some point I also noticed if I deactivated the elements that had images being drawn, the error would also never happen.
I've finally realized(and tested many times to be sure) that the error happened when:
I had the game view resized whe playtesting, be it with the "Resize on Play" option or manually resizing it; and
the Context Menu was visible when I stopped play and went back to the editor
My suspicion is that something is going wrong when the screen is resized with those UI elements showing, almost as if resizing them to scale was causing some fatal error. I frankly have no idea, there's nothing different showing up in the Editor or Player logs either, so I'm basically asking if you've seen this before, and if there's anything I can do besides just avoiding resizing the game view when playtesting to avoid this crash.
Thanks in advance.
Your answer
Follow this Question
Related Questions
Unity 5.3.3 Crashing When Dragging Main Camera In Hierarchy 1 Answer
Big bug in all materials 0 Answers
Is this a bug or im doing something wrong? 2 Answers
unity start but doesnt open 0 Answers