Menu System and UIs have broken

Somehow after saving and updating the Pause Menu UI system. I come back to the main menu scene to test and Then I find the main menu is not showing up correctly anymore. Somehow the main menu ui was build and settings from the Pause Menu UI were saved over. But I could not find any overrides that effected it directly. I tried reverting all of them to avoid the effects happening to the rest of the UIs but it somehow made things worse. Now more of my UIs are effected and changed. I can not seem to change them back with reverting overrides either. I tried and it defaults them to a base build of the pause UI with only one button. Here is what the main menu now looks like and what the UI Canvas looks like showing everything now.


I will try and go back and see if I can rebuild things part by part…but is there by chance a way to view detailed changes? So say when something like this happens again I can look at my history and find what point I was at before the problem occurred.

While following along I did have auto save turned on since we were saving after each change and update we made in the different UIs so I was trying to save time. Would that have caused this whole mess?

If you’re using Source Control (git), you can commit changes as you work, and roll things back when things get ugly. Unfortunately, Unity’s Undo system doesn’t always work well with the UI system, especially if you have autosave on…

As I was saying… I learned the hard way, a long long time ago to turn Auto Save off.

Another big problem is that it’s easy to get a mismatch between what’s going on in the in game UI Canvas and what’s going on in the prefabs that make up that UI. A few things I do to help avoid disaster:

  • Each menu is on it’s own canvas
  • Make changes in the individual prefabs, do not TOUCH the versions in the Core
  • Use source control and commit your project before making any changes to UI. Be prepared to revert early and often until you get it right.
3 Likes

This is gold. You don’t even need a github (for example) account. You can literally make a local repository on the machine.
I do this all the time. I use git because this is also what I use at my day job, and it is so easy to just create a repo right there in the folder. I do this so often that I have my standard .gitignore for Unity on my desktop and I can very quickly just copy it into the folder and create a repo. From there, I can make all the changes I want without fear of breaking my project

I actually have the Git GitHub course here as well. I think I might take a step back from the development courses and work through working with Git and Version Control first to see if I can set myself up in a better position.

Also I think I have saved myself luckily. I am in need of getting a new laptop as my current one has about one year left until it is most likely dead for good.

I ended up saving a backup of my project work. I doesn’t have the work on the menu systems so I will have to rebuild them but it saves me the trouble of having to rebuild everything from the ground up at least.

I have wanted to get better at using GitHub and especially with cleaning and organizing repos on my GitHub account. I have a few from classes in college I want to move into other repo folders but keep the history. Some of them are also shared repos that I want to move. But I need to learn more about GitHub and how it works before I want to attempt anything like that. How long have you been working with Git and GitHub?

Oh, longer than I can remember. I use it in my day job and I’ve been programming for well over 20 years. I’ve been through microsoft’s TFS, subversion, mercurial, git, and there may be others that I can’t remember now. But I’ve been using git for several years. More than 10. Just not sure exactly how much more. But I’m no expert. The UIs available hide all the complexities and nuances, so I just know what I need to know to get by.

Same here. I’m thankful for those UIs. When I first tried git, it was all command line, and I loathed it. I use GitKraken now, and it’s effortless.

I hope with the learning I have with getting a better hand on using Git and GitHub and SourceTree (SourceTree will be new for me as I have only known GitHub desktop)

I hope I’ll have a better understanding of things so I’ll keep a better save and update for my projects for learning in the courses and my own projects I am looking into for personal work and for my current job where I am going to build a little mobile app.

This is good to know and I will make sure to remember this as well.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms