How to back up your Unity project?

Nina used to reccommended me a week ago about the Library folder of Unity project, she said if I want to back up, I can delete Libray folder. Then I try to move Library folder away from Unity project, the result is Unity installing some files in Library folder when I try to launch this project again but I found out all of GameObjects was deleted. So, I moved the Libray folder back to the project then all of GameObjects come back, the project can run to normal again.

My question this time would like to know which files can I can delete, which files I cannot delete for the sake of backing up the project?? :grinning:

Hi superkookai,

I probably shared this text snippet with you, didn’t I?

Make a backup of your project folder by duplicating it. Save the duplicated folder somewhere else, maybe on an USB stick. To save some free space, you could delete the Library and Temp folders in the backup folder.

These two folders are save to delete.

If you want to delete other files, you have to ensure that you are able to retrieve the excluded content elsewhere. You could, for example, delete packages. The packages can usually be downloaded via the Package Manager.

However, the two important questions are: If you open the project in a year, will the packages still be available? And if they are not available anymore and if your project depends on a ‘missing’ package, will you be able to find a replacement?

The first question is not that important than the second one. If your project depends on packages, you want to ensure that they are included in your backup. The purpose of a backup is not to fill space on a harddrive but to make sure that you will be able to retrieve a working project if, for example, your computer breaks or if packages/assets get deleted ‘on the internet’.

Since each game is unique, there is no universal answer. Unless you do a lot of research and know what you are doing and how to fix things, I would not recommend to try to slim the backup down. In the worst case, you will get an broken backup.


If you duplicate the backup (without the Library folder) and open the duplicated project (not the backup!), Unity will recreate the Library folder. Then Unity launches the project with the empty default scene. If you are suddenly confrontent with an empty scene for no apparent reason, always check the scene name. In most cases, you just have to open your own scene to ‘retrieve’ your game objects.


See also:

It isn’t recommended to delete or move the Library folder in a Unity project because it contains important files needed for the project to function properly, such as scene settings, assets, and components. Instead, to create a backup copy of the project, it is recommended to use the functionality of the built-in Unity “Asset Serialization” tool, which allows you to save all the necessary project data without the risk of losing GameObjects or other important elements.

This is wrong. The Library folder is generated by Unity from the project itself and can safely be deleted; Unity will generate it again. This is why we don’t include the Library folder in source control and ask people to exclude it from zip files when sharing their code with us to troubleshoot a particularly difficult problem.

Since @bixarrio mentioned source control, here is a typical gitignore file that gets used by game developers:

These things can usually be deleted in your backup project unless there is a good reason why you want to keep them like user settings or assets.

Some people exclude assets from their repository for legal reasons or because the files are too large, so don’t delete anything just because it is excluded from the repository.


While you may delete the Library folder, it is usually not recommended to delete it in the actual project, especially not if the project is open. @PaigeCameron is right in this respect. What I wrote about the backup is true for the backup only.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms