Canvas elements messed up

Hi, I am learning Unity and gave it a shot with tic-tac-toe game.

I have been able to create the game and in fact I have the build ready as well. However the last time I opened the project I made some changes which messed up the UI elements and I unintentionally saved it and closed Unity. Now I am not able to go back to the previous version.

I don’t intend to rollback my changes with some magic button since I am not using Git or similar tool. I want to know what these changes were and how can I revert those changes.

I wanted my game to be fit on all screens, so the changes I was playing were related to:

  1. Rect Transform
  2. Size of elements.
  3. Game->Display->Screen sizes/Simulator screen sizes.

As a new user I am only allowed to post one image so uploading the messed up ui elements image. Please help me revert it back to the original one.

Now <-|-> How it was originally:

4 Answers

4

Hello @ronit1304,

Seeing the first screenshot I think you pressed the full stretch option while selecting every UI elements, can you share an image of the inspector of one of the UI element and also if you could have the GameObject’s hierarchy next to it it would help

Here

This looks overcomplicated for not much… how about you use the GridLayout component, it would help you have a clean layout without having tens of gameobjects for your grid

Sure I will use it. Meanwhile I am sharing another screenshot of how it loos in Game Mode. The above screenshot of messed up elements was from Simulator view

In Game Mode it looks like this, whereas the previous screenshot was from Simulator view. It definitely looks like there has been change in size and shapes of the elements. I also don’t understand why there are red crosses instead of the actual element.

Red crosses means the Width or Height value is negative