- Home /
Layout error after crash has effected canvas scaling
Hello, I recently had a crash after saving a script in mono develop. When I returned to the Unity window the program immediately closed and later a bug report window opened but I chose not to report it had happened before many times throughout the last year, maybe once every week or two, when using unity 7 - 10 hours a day the entire time.
When I opened my project I had an error message from Unity trying to load the layout i was using which consisted of the profiler on the bottom tab section and lighting on the right etc. I chose to load the default layout because it wasn't really a big deal for me at the time. I then learned it was because i made a small type error in my code so i went back to my editor and saved the script (no saves in the unity editor). Now my ui has been tampered with on a global scale. I'm not getting any errors but it appears that the canvas scaler is not working anymore. When I change the size of the editor window, every child of the canvas is moving all over the place and not scaling correctly. Before dragging the screen would result in a slight lag, and then the ui elements would recalculate their position.
I don't want to save anything in Unity before I get some advice on what to do or what might have happened. Whether it is the canvas scaler or not, the problem is the elements are not at all scaling to screen size. They do attempt to change size but are going in opposite directions, etc. No harmony what so ever anymore, yet it was perfect for almost 8 months. Current Unity version is 5.3.5f1.
Any ideas and suggestions are GREATLY appreciated.
Answer by andrew_2992 · Jul 04, 2016 at 07:07 PM
Just in case anybody has an error with their UI objects resizing unusually after the layout gets reset, I'll post my solution. The problem was actually caused by the resolution my game was using after the reset. It seems resetting the layout does not just reset the tabs and windows you've arranged but the resolution you're using in the editor and while playing in editor. I fixed that and everything worked fine.