If you trying to develop any game in Unity or even if you are trying to experiment with Unity I suggest using some kind of version control system. Even if you are developing something alone. It will bring a lot of benefits:

  • You will have a backup of your code.
  • You will see a list of changes before you commit changes. This can help you see unwanted changes. Once I spent a few hours because I accidentally press a minus key.
  • It will allow you to go back in time and get the version day/week/month ago. It is very helpful because sometimes you do change that broke something but you didn’t see it immediately. And later it would be very hard to find what change broke your code. But if you commit often, usually it will take from minutes to an hour to find the change that broke the functionality.
  • It is much easier to experiment with your code. Just make sure you commit everything before you start experimenting. If your experiment is successful then commit new changes. Otherwise just roll everything back. It happened to me very often. I had a great (I think) idea and then I started refactoring. And then somewhere in the middle, I found that it is a bad idea. It takes a lot of time to revert everything back and very often I forgot something. VCS makes it extremely easy.
  • It is very easy to go back to the old code. For example, you may refactor code and everything looks good for some time. Then you may realize that you didn’t take into account some cases that the old code did. In this case, you can check how the old version works.
  • It is very helpful to review your changes just before commit. It helps to find some experiments or unfinished code. Sometimes it helps you to find nonoptimal code.