how to delete a unity project
When working on a project in Unity, you may want to move it to another computer or a different folder location.
Maybe you're looking for a simple way to back up your work, or maybe you just want to work on it from different computer than you started on.
Perhaps you want to duplicate the entire project in the same location so that you can work on two versions at once…
Whatever the reason, while it is a very simple task there are a couple of tips to keep in mind that will make moving or copying a Unity project much easier.
So… what's the best way to move a Unity project to a new location?
The right way to move or duplicate a Unity project is by copying the entire folder to the new location, making sure to enable 'Visible Meta Files' in the Project Settings first. It also helps to remove the Library and Temp folders when moving the project, as these can be very large and are not required, as Unity will rebuild them automatically.
This is different to exporting a Unity Package, which does not include project-wide settings and package manager dependencies. Moving a project by copying the folder is the best method for moving an entire project to a new location without breaking it.
In this article I'll be exploring each step in detail, as well as a few tips to make moving your project a little easier.
Here's what you'll find on this page:
How to move a Unity Project step by step
- Enable Visible Meta Files
- Delete the Library and Temp folders (optional)
- Compress the folder to a Zip file (optional)
- Copy the project folder to the new location
- Add the project to Unity Hub
Got to Edit > Project Settings and select the Editor Tab.
Find the Version Control Mode and, if it's not already, set it to Visible Meta Files.
How to change the Version Control in Unity 2020 and up
In Unity 2020, you'll find this option in the Version Control tab of the project settings, not the Editor tab.
Why should you enable Visible Meta Files in Unity?
In Unity every asset has hidden meta data that is used to make and maintain references between script variables, game objects and assets. This meta data is stored in .meta files which are created by Unity when you import assets.
These meta files are hidden by default and, while Unity does not need to be visible to use them, other software may do. Enabling Visible Meta Files simply makes sure that they are included when the project is moved or copied.
This prevents the hidden references from being recreated, overwritten, or duplicated which can cause broken connections and errors. This is especially important if using version control software or when accessing the same project from multiple locations.
The good news is that, while researching for this article, I wasn't able to deliberately break a project by keeping the meta files hidden, so it's unlikely that missing out this step will cause you many problems in most scenarios.
However,
As it's such an easy step, and because it can potentially protect your entire project from breaking when you move it, it's good practice to set them to visible anyway.
2. Delete the Library and Temp folders from the project directory (optional)
This step is optional and only applies if you wish to move a Unity project to a different computer.
Open File Explorer (Windows) or Finder (Mac) to find your Unity Project.
Unless you've changed the default location for new projects, you'll find your project in your Documents folder under Unity Projects.
If you can't find your project folder then open up the Unity Hub, find your project in the list and select 'Show in Explorer'.
Once you've found your project folder, copy the entire directory to a new location (your desktop for example).
Open the copy and delete the Library folder and the Temp folder (if there is one) from the directory.
Why should you delete the Library and Temp folders?
You don't have to delete these folders.
The reason that you may want to, however, is to reduce the size of the directory before you move it.
For example, to test this method I moved a small project which, when zipped, was 180 MB in size with the Library folder included.
By removing the Library folder first, it was only 25MB.
Removing the Library and Temp folders can massively reduce the size of the folder temporarily. This is ideal if you want to fit it on a small USB stick or share it online.
Then, when you open the project copy, Unity will rebuild the Library folder in the new location, restoring it to its original size.
Why make a copy of project directory first?
It is safe to remove the Library and Temp folders from the original project directory as Unity will simply rebuild them when you next open the project.
However,
For the time it takes to make a copy of the project first, it's much safer to do it this way. As deleting the wrong folder by mistake could break your project.
3. Compress the folder to a Zip file (optional)
This step is optional. It's most relevant if you wish to upload a Unity Project using cloud storage, such as Dropbox.
When you're ready to move your project, it's time to Zip the project folder.
Right Click on the root folder, which is named after your project, and select Send To > Compressed (Zipped) Folder (Windows) or Compress (Mac).
Why should you Zip the project folder first?
You don't have to Zip the project folder to move it.
However…
A Unity project, even a small one, may include many thousands of files.
And while this may not cause you any issues when moving a project locally, it can affect performance when uploading and downloading so many individual files. Something you may have noticed if you've ever created a new project (even a completely empty one) inside of a Dropbox folder.
For example,
It took 1m 33s to upload my test project which, although small, included almost 10,000 individual files.
To upload the same project when zipped, only took 40 seconds.
And while the time savings in my example are small, it's likely that your project is much larger and much more complex.
Zipping the folder makes it easier to manage and quicker to move.
4. Copy the project folder to the new location
Lastly, paste the directory, or extract the zipped project folder, to the new location.
How to create a duplicate Unity Project in the same location
If you're not moving the project to a new location, and all you want to do is create a working duplicate in the same folder as the original project, here's how to do it.
- Enable Visible Meta Files but ignore steps 2 and 3.
- Duplicate the project folder inside the Unity Projects directory.
- Rename the new folder as you like.
- Add the new project copy to Unity Hub (see below).
5. Add the project to Unity Hub
If you're using Unity Hub you'll need to add your, now moved, project to the list of Projects in your dashboard.
Simply open Unity Hub, click Add and select the new project directory.
At this point you may also want to make sure that you have the same version of Unity installed as the source project (if moving the project to a new system).
If you don't, you can download a specific version of Unity, (including older versions) from Unity's download archive.
You can now open the project as normal.
How to remove a project from Unity Hub
If you're no longer using the original project you may want to remove it from the Unity Hub projects list.
To do so simply find the project from the list and select Remove from List from the dropdown menu on the right hand side.
This will remove the project from the Unity Hub list but it will not delete the project folder.
If you want to do that, you can simply delete the project folder manually from the Unity Projects folder.
Now I want to hear from you
If you've been working in Unity, chances are you've had to move your Unity project at some point.
What happened?
Were you able to move the project without breaking it?
And if something did go wrong, what do you wish you had known beforehand that would help someone else right now?
Whatever it is, let me know by leaving a comment below.
Image Attribution
- Icons made by Freepik from www.flaticon.com
- Unity Logo © Unity Technologies
Get Helpful Game Development Tips, Straight to Your inbox
Get access to exclusive tips & tricks and master game development basics the easy way, with deep-dive tutorials and guides.
My favourite time-saving Unity assets
Rewired (the best input management system)
Rewired is an input management asset that extends Unity's default input system, the Input Manager, adding much needed improvements and support for modern devices. Put simply, it's much more advanced than the default Input Manager and more reliable than Unity's new Input System. When I tested both systems, I found Rewired to be surprisingly easy to use and fully featured, so I can understand why everyone loves it.
DOTween Pro (should be built into Unity)
An asset so useful, it should already be built into Unity. Except it's not. DOTween Pro is an animation and timing tool that allows you to animate anything in Unity. You can move, fade, scale, rotate without writing Coroutines or Lerp functions.
Easy Save (there's no reason not to use it)
Easy Save makes managing game saves and file serialization extremely easy in Unity. So much so that, for the time it would take to build a save system, vs the cost of buying Easy Save, I don't recommend making your own save system since Easy Save already exists.
how to delete a unity project
Source: https://gamedevbeginner.com/how-to-move-or-copy-a-unity-project-without-breaking-it/
Posted by: boosegialren.blogspot.com
0 Response to "how to delete a unity project"
Post a Comment