Unity not saving scenes or project. Lost everything twice.

Hello, I am working on my first Unity project. I spent about 4 hours working on things and it was going smoothly. I was clicking "save’ and hitting “ctrl+s” every 10-15 minutes. Then once I closed Unity and tried to reopen the project, everything was gone. At this point, I realized there was a “Save Project” option. So I started over and starting clicking both “Save” and “Save Project” repeatedly. After another few hours of getting back to my previous place, I did one last final save of both the scene and project then closed Unity. But once again everything is gone, all the sprites, the scripts, everything.

I’ve read other posts but they all suggest not saving when in play mode (I’m not) and being sure to save both scenes and project (I do).

This is obviously frustrating and I would love some ideas of why Unity won’t save my project. I am using version 2020.3.15f2

thanks for any help you can give.

5 Likes

I’m sorry you’ve had this issue. Please consider using proper industrial-grade source control in order to guard and protect your hard-earned work.

When you first set up source control, don’t do more than about 30 seconds of work before committing it, then clone it to a new directory (or even better a different computer) and verify you have captured 100% of the 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.).

As far as configuring Unity to play nice with git, keep this in mind:

Here’s how I use git in one of my games, Jetpack Kurt:

Using fine-grained source control as you work to refine your engineering:

Share/Sharing source code between projects:

Setting up the right .gitignore file:

Generally setting Unity up (includes above .gitignore concepts):

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

1 Like

I’ve had this issue a few times where unity appears to save the scene but it doesn’t do it.

One way to check if it saves is to see if the asterisk * is present in the unity editor bar near the file name. But this check fails in this case because I definitely saw that asterisk going away yet it didn’t saved the scene.

I’ve got this bug in the same project where the “loading bar freeze unity for 10 minutes” happens so it may or may not be related.

I’ve noticed that if I save the scene to anew scene with a different name it actually saves.

Try saving the scene that doesn’t save to a new scene with a different name. Then saving should work on this new scene.

Samething was happening to me. I’d see the asterik, save the game, the asterik would disappear but then after closing Unity, everything would be gone. I finally just uninstalled everything and reinstalled it. Haven’t had a problem since.

hello all,
I have the same problem. I have a folder where unity does not store anything, despite having permissions, there are assets that were imported, but everything I do in unity is not stored.

solution: I had to add a new scene, instead of using the scene that is created by default… then I delete the original scene and work with the new scene and that’s it.

Hello! I was experiencing this same issue. My project was absolutely different from what I had worked on. I found a fix by:

  1. Open the (Broken) Project
  2. File > Open Scene
  3. Load the Scene that I had working on the previous day.

For some reason, even though my Scene was saved, it was not pulled up by Unity when I opened the project, and by re-opening the scene manually from within the project, it restored it to the way I had it saved.

Good luck everyone!

6 Likes

I have run into this exact same issue two times now, and it boggles my mind.
I’m on windows 10 x64, and this is with Unity 2020.3.15f2.
I was working on a project yesterday, and I saved (1) the scene (2) the project (3) a backup of the scene. Before stopping for the night, I closed Unity, reopened it, and my work was all still there. I thought it was fine.

I closed Unity again, put my computer onto sleep mode, return today, and now it is all gone. When I reopen the project, it loads a default Unity scene. All the files I had created are gone. Why? This is absurd. Something is wrong.

I want to be super clear about this. I have Unity installed in C:/Unity. I have Unity Hub installed in C:/UnityHub. My C: drive is an SSD.
All of my actual projects are stored on a different SSD. They’re installed in G:/Project1, and G:/Project2. So, I did not install these into a strange folder that you’d expect to get deleted. My two latest projects have been wiped in this manner. My earlier projects (ones made several months before today) have not been wiped - at least I don’t think so. I’m going to make backups of them and put them on a totally different hard drive before I open them.

To my knowledge, I do not have any software on my computer that resets or deletes files for me. No SourceTree or anything like that.

Please, please, someone tell me what’s going on here!

nsa4ever’s fix did not work for me, nor did jpbracaprado’s fix.

https://stackoverflow.com/questions/69322750/unity-erased-all-my-progress-on-my-project-back-to-original-state
Here are other threads with the same issue, still unsolved.

This can work, but it is extremely clumsy to be copying huge files around all the time, plus you have no way to know if some little part of it got corrupted. It would be FAR more useful for you to learn how to use source control properly. It is the year 2022 after all… this is a well-solved problem.

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

1 Like

The issue has nothing to do with git or source control. It has to do with Unity files getting deleted for no clear reason. There must be some reason why this is happening. Files don’t just delete themselves. This issue has been happening to multiple people for years, as evidenced by other threads on the topic.

You already posted that same copy+paste in this thread. Please stop spamming these massive copypastas that are unrelated to the issue at hand. Instead, can you explain why these projects are getting wiped clean? And, what we can do to avoid it? That would be helpful.

5 Likes

The real issue is that one lose trust that unity will actually save the work you are doing. You may use online backups, copy files around, other stuff like that, but maybe that one time you think all is good or you have forgot to backup maybe then you get pounded in the head.

once you get burned by this you are out. There are not many apps that I remember pulling the rug under you by telling you that the work is saved when is not.

If you read this and you never experience it, once it happens, if it will happen, remember this post. The feeling of losing trust is not nice at all. :expressionless:

It may happen once and never again 10 years from now but the big IF is there in your mind.

1 Like

That’s true. But I don’t want to sit around being sad and paranoid about losing my future work. I’d like to find out what’s causing this issue. Then I can trust I’m avoiding it in the future. Can you think of anything it might be?

1 Like

I’ve lost two years trying to find solution for unity bugs with little success. I don’t have an answer why this happens, only thing I’ve noticed is that maybe you can fix it by saving the scene with the issue as a new scene with a different name.

I’m having this same issue… this is ridiculous. I’ve been very persistent about saving the project every 10 minutes or so, yet when I close Unity and re-open it all recent saves are gone. F’ng ridiculous, FIX THIS.

2 Likes

I just had this happen to me, and I came here to make a post thinking it might have to do with me using a newer version of unity, but… I see that this has been a problem for 2 years before today. I guess I’m wondering if nobody really knows what is going on here after all this time, does Unity ever plan to fix this…? Does anyone at Unity even know this happens?

1 Like

See my post above… use source control early, often and correctly. And TEST it to prove you really are backing up what you need. It’s only basic economics to protect your work.

“Use source control or you will be really sad sooner or later.” - StarManta on the Unity3D forum boards

Lost progress / project / work / stuff disappeared in Unity.

This article is to help you when you have lost significant progress or work in your Unity project.

It is designed to give you avenues of discovery and investigation.

It is NOT a guarantee of restoring your lost work. It is NOT a substitute for proper IT / Data security procedures.

To decide which parts are applicable to you, look for major bolded headings.

EVERYTHING IS GONE, YOU CANNOT OPEN THE PROJECT

Your project probably is still on your computer. Try a computer-wide search for some unique filenames that you know are in the project you think is gone.

To start your search, one common file to all Unity projects is named ProjectSettings.asset

Some things that might have happened:

  • you are not opening the project that you think you are

  • you are in the correct project but not opening the same scene you had open before

  • you dragged the project (or part of it) into the trash (intentionally or inadvertently)

  • you moved the project (or part of it) somewhere else (intentionally or inadvertently)

  • an overly-aggressive antivirus solution quarantined it because it saw code being compiled in there

  • you’re using a directory sync like OneDrive or Dropbox… NEVER USE THESE SERVICES WITH UNITY!

  • something else??

As I said, it’s probably still all on your system to be found if you look in the right places.

A typical Unity project will have at a minimum the following folders:

ProjectSettings\
Packages\```

**EVERYTHING IS PRESENT BUT MY SCENE WINDOW IS BLANK**

Close Unity and make a full project backup RIGHT NOW. Do not do ANYTHING else until you back it up 100%.

Ideally copy that backup to another computer, or back it up into the cloud. This is just basic data processing best practices.

If you can see all the files and folders of your project, make sure you are opening the scene file you were working in.

Once you have opened the scene, look in the hierarchy window, select an object and move the mouse over the Scene window and press F to focus that object.

Additional notes:

- ALWAYS use proper industrial grade source control (see below)
- NEVER use Dropbox or any file sync mechanism in Unity.
- NEVER move files within your project, except by doing it within Unity
- ALWAYS be sure you are fully backed up before upgrading Unity

**SCRIPTS OR ASSETS ARE MISSING OR BLANK**

Some info about Missing script warnings, GUIDs, renaming GUIDs, etc:

https://discussions.unity.com/t/836322/2
https://discussions.unity.com/t/815173/7
https://discussions.unity.com/t/815173/9

EVERYTHING in Unity is connected to the above GUID, which is stored ONLY in the metafile.

It is super-easy to inadvertently change it by renaming outside of Unity. Don't do that. Instead:

- close Visual Studio (important!)
- rename the file(s) in Unity
- in Unity do Assets -> Open C# Project to reopen Visual Studio
- now rename the actual classes, and MAKE SURE THE FILE NAMES DO NOT CHANGE!

If you are NOT using source control while you do this, renaming files is an EXTREMELY dangerous process. Use source control at all times so that you can trivially revert if you miss a critical step and damage your project.
1 Like

They know. The editor core functionality has issues with dealing with files in the project. To “fix it”, they need to rewrite the editors for the 2020, 2021, 2022 versions. But this will break all people projects as updating from previous editor version to this new hypothetical fixed version would be very hard or impossible. Because old projects may be incompatible. This would cost a lot of money in dev time and will delay the release of planned features and improvements.

With unity being on brink of bankruptcy investing in this “fix” is not possible.

I have no trust they will fix this for the 2023 version, maybe in the 2024 if they get to that version.

Also they “don’t care” right now because most of unity users are people that are invested till the neck by having a project already released (they will not go away) and they use the editor to upkeep their game. Or people that just try to learn unity, beginners, (they have no idea) and For this last group the CEO doesn’t care about them as he publicly stated.

There are also those that are working on a project right now. Good luck with that people.

They don’t need to fix the engine for now, as no sane medium to big game company will try to use unity for a new game. No need to attract them with a tool that works

I’m saying that they “don’t care” because from their point of view fixing this is pointless now. It makes sense to just milk the ads part by providing tools for adds to the existing online projects.

1 Like

Late to the party …

I solved all my Unity issues by making sure my Unity project was not in a folder that was being backed up by OneDrive, Dropbox or Google drive services. Those things might as well be a virus where Unity dev is concerned. Hope this helps others.

1 Like

Had this happen last night.

I can imagine that a version control system such as git would alleviate these problems, in that as long as you did regular commits and or at least did a commit before closing down the project, but ensuring that before committing to git you check that no files have been deleted and such.

Can anyone confirm that a strategy along these lines with using something like git does indeed solve the problem!?

Update: looking at the post above from Kurt-Dekker with the text “Personally I use git” seems fairly thorough, but doesn’t state which editor he uses.

at least with version control/git you get something back (like previous day, if you only made commit then).

yes, before commit it will display what files are new, what are modified, what have been deleted.
(so if unity deleted some files, you can see what files they are, compared to previous commit)

1 Like

Thanks for the thorough post!

Which editor versions have you had success with this strategy!?

There’s been some other comments in this thread that talk about editor versions 2020-22 that have had some serious issues with file deletion and such.

I’m personally using the latest 2023 tech stream release (as need some newer features).