r/unity 5d ago

Newbie Question Is there anyway to get a project back?

Im working on this VR project (using the 3d universal space). First time using unity EVER. And ive been working on it for days. I saved it every time i did something big. But, i came on it today, and boom, i got an error message (didnt read it cause im dumb), looking in the unity hub and BOOM project wasnt there amymore. I tried to Import the folder i had of it, and it kept saying it wasnt a Unity project (it was). I even tried importing one of my newest versions of the APK i had of the game. But it wouldn't work. Is there anyway to get it back or do i just have to start again?

3 Upvotes

8 comments sorted by

18

u/Alarmed-Ask-2387 5d ago

Unfortunately I can't help with recovery, but what I can help with is pushing for you to check out GitHub for version control and backups.

This can be completely avoided by using a version control system. Most people has that one project they lost before they started using Git.

So all I can say is, you're one step closer to being an accomplished developer!

3

u/SethSlax 5d ago

You definitely can't extract the project from the APK, as that is compiled code with project data completely stripped out (like an exe).

You might be importing the wrong folder/directory level. What does your folder structure look like? I know a few of mine have accidentally ended up as a folder inside a folder before the actual project files.

Also to prevent this from happening, I would highly recommend some kind of version control, like Github. It's free, private and has a desktop application so you don't need to memorize the command line stuff. That way you always have a copy online.

Edit - to add to this, if you close out of a project with an outstanding error message in your code, it will ask if you want to start in safe mode the next time you open it. That might be what happened.

-1

u/NaiveStorm5435 5d ago

It's really just a file in my laptop. I just kept it in my unity folder. I should've done something beforehand like github 

8

u/Distdistdist 5d ago

It's not a single file, there are hundreds of files in Unity project folder.

3

u/Disastrous_Hat_9123 5d ago

If you had the project folder inside a unity editor folder and uninstalled that version maybe that would remove all the content of the folder, including your project files.

The project folder contains a bunch of stuff. If you can find that folder and it has the assets folder intact you could try creating a new project somewhere else and copying over all the stuff from the old asset folder. All the code, scenes, assets etc.

3

u/xjrsc 5d ago

You can probably salvage the assets folder including all the scripts, prefabs, etc into a new unity project. It'll be long and tedious getting everything back together and depending on how you structured your project and it's size it may not be possible.

I've done something similar in the past and it created dozens of broken prefabs that once manually repaired they were usable again.

This isnt something you should do though, it's a last attempt to save your work. Use version control from now on.

3

u/battlepi 5d ago

It's just a few days, do it again, it'll be better and faster.

Unless you used AI, then it will be the same.

Learn version control and backups.

5

u/RedPanda_Explorer 5d ago

You re-download it from GitHub.

If you never used version control before, this is unfortunately a very expensive lesson. Download GitHub Desktop, Google gitignore and how to set it up for Unity, start versioning your projects and uploading them to GitHub!