After loading project, everything is gone!

So I spent the last few days building a 3D scene targeting the Meta Quest (2). Had no problems restarting Unity and reloading the project before. But just now, I started Unity and tried to load my Project. I got an error message of which I can’t remember the text exactly, but it was something along the line that it found a duplicate of “System” and in order to fix it, I had to start in safe mode.

So I clicked on “Start in Safe Mode” and immediately exited out without saving anything. Now when I load the project, my Hierarchy is empty except for a Main Camera and a Directional Light.

Everything else is gone. 48 hours of work down the drain. And no, I hadn’t made a backup yet.

So what happened and is it really gone? Anyway to recover my work?

1 Like

Good learning moment to use source controll next time.
If it’s gone depends on what happened.
If it crashes in safe mode check the logs for the error.
You xan see in the directory if the scripts and scenes are still there. It probably just put you in a new scene, so make sure you open the proper scene

3 Likes

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 to another external hard drive entirely. This is just basic data processing best practices during data recovery operations.

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, broken prefabs, 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, and hence why the metafiles ALWAYS MUST be source-controlled.

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.

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

I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

Here is 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. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

If you plan on joining the software industry, you will be required and expected to know how to use source control.

"Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
1 Like

It’s gone. I have searched for “.unity” files, I’ve checked the Recycle Bin. No trace of my scene.

I’ve started a File Undelete program (Active Undelete) but the scan alone will take another 120 hours to finish.

I guess it’s faster to just start over. In all honesty, I’ve been an application programmer for somewhat over 45 years now and this is the first time that a crash of the IDE completely obliterates the project you’re working on. So, ya. Blame me for not making a backup or not using some kind of source control. But I’ve only worked with Unity for 3 days now and I hadn’t set it up yet.

Where did you create this project originally, as in what file path?

I created the project on a seperate drive (other than my boot/windows drive). As in:

F:\Programming\Unity\Project<Game Name>

I checked te Assets\Scenes folder but the only files there are “SampleScene.unity” and “SampleScene.unity.meta”

Like I said, I’m using Active Undelete to see if my project files are still there. But it’ll take another 118 hours for Active Undelete to just finish the HD scan. If you know of another, faster way to check for deleted files, I would love to hear that. :slight_smile:

1 Like

At any point in time did you ever SEE the files on your hard drive outside of the Project folder within Unity? As in, did you browse there with File Exploder and actually see files at any point in the process?

These reports of lost work are starting to get common enough that I wonder if something else is happening. I have never seen an issue and I’ve used Unity ranging from version 3.3 to 4 to 5 to 2017, 2018, 2019, 2020 and up to 2021 presently, never even so much as a single lost file that wasn’t directly my own fault.

I’m curious if there’s something wrong with the way that external drive is configured such that files are simply not written to it, either for permissions issues or other filesystem minutiae.

I have no idea what Active Undelete is, but good luck with it.

As it turns out, the scene wasn’t deleted. Just not loaded. I was thrown off by the fact the only scene in my Scenes folder was “SampleScene.unity” and after opening my project, it was displaying “SampleScene”. But apparently that was just an empty scene, and not the SampleScene on disk. Also, I’m pretty sure I had renamed my scene to something else, but apparently not. Anyway, when I loaded the SampleScene from disk, everything was back.

Odd thing is that if I click on “Open Recent Scenes” in the menu, the top one says (in grey) “Path noth found”. So I’m guessing at least something went missing. Perhaps my scene somehow lost its name and that’s why it was saved as SampleScene?

1 Like

That’ll happen if the scene was moved or renamed. Unity is, generally speaking, fine with you moving assets around – it cares about IDs, not file paths (that’s why those .meta files are there!). However, the recent-scene list is just a list of file paths.

So, when a scene asset moves, it checks the old location and can’t find anything.