any way to stop projects getting corrupted? every time the power goes out or flicks while working on project, the entire project gets corrupted and you have to start again from nothing loosing hours if not days and weeks of work.
New HDD New Install. using 2021.2.9 (cannot use 2022 cause post processing dose not work, you set it up, but nothing shows on the game screen.)
version control (very important), automated incremental backups, UPS power supply…
Yes, ALL of these things that @mgear states above… Most likely what you call “corrupted” may only be a single bad file or locked file, and source control would instantly point out the problem file and let you recover.
One thing to note is that sometimes the project’s Temp directory (the one at the same level as Assets and ProjectSettings in your project) gets wedged in a way that prevents Unity from starting, so the answer in that case is to remove it, as it gets removed normally when Unity exits.
I’m sorry you’ve had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.
Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).
You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.
As far as configuring Unity to play nice with git, keep this in mind:
https://discussions.unity.com/t/736093/3
Here’s how I use git in one of my games, Jetpack Kurt:
https://discussions.unity.com/t/807568/3
Using fine-grained source control as you work to refine your engineering:
https://discussions.unity.com/t/826718/2
Share/Sharing source code between projects:
https://discussions.unity.com/t/719810/2
Setting up an appropriate .gitignore file for Unity3D:
https://discussions.unity.com/t/834885/5
Generally setting Unity up (includes above .gitignore concepts):
https://thoughtbot.com/blog/how-to-git-with-unity
It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.
“Use source control or you will be really sad sooner or later.” - StarManta on the Unity3D forum boards
My guess would be you’re more likely getting corruption somewhere in the Library folder than in the project files themselves. That’s where I’ve seen corruption most often. To resolve that you just close Unity, delete the Library folder, and reopen the project. The Library folder can take a while to rebuild, depending on project size.
As far as the actual project files, as already mentioned you should use source control like Git or SVN. Then worst case you’re only lost the work since your very last commit.
Delete your Library and Temp folders when your power goes back on. I’d also just use something like Bitbucket, which is free for most devs. It’s good to use version control so you can make crazy changes and go back if it breaks the game. Also allows you to upgrade Unity versions much easier. As a final note it’s good practice to get used to version control if you ever want to go into the gaming/tech industry.