Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2019.4.X, 2020.3.X, 2021.2.X
Votes
1
Found in
2019.4
2019.4.25f1
2020.3
2021.1
2021.2
2022.1
Issue ID
1357782
Regression
No
All files are deleted when building an iOS Player to the desktop
How to reproduce:
1. Create a new project
2. File > Build Settings…
3. Select iOS and Switch Platform
4. Click Build and select Desktop as the build target
5. In the pop-up warning click Replace
Expected results: The build process to create a folder where all files are placed or place all the files on the desktop
Actual results: Files on the desktop are deleted and 3 errors appear in the Console
Reproducible with: 2019.4.30f1, 2020.3.19f1, 2021.1.22f1, 2021.2.0b12, 2022.1.0a9
Notes:
- Deletes files that are on the desktop! Make sure to backup desktop files when trying to reproduce this issue.
- Unity needs to have iOS support to build to iOS Player.
Errors (full errors in the edit):
1. IOException: Access to the path '/Users/…/Desktop' is denied.
2. Build completed with a result of 'Failed' in 23 seconds (23271 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
3. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
Comments (9)
-
kylenchandler
Jan 14, 2025 23:54
Experienced this same issue now in 2025 with most up to date Unity version. It literally deleted the entire folder and all sub-folders which had multiple Unity projects and game assets, not to mention the main game I've been working on. Completely gone without a trace, nothing in the trash or anywhere on the entire system, and to top it off, not even an iOS build. Putting months of work into a project and then losing it in an instant is bad enough but If I had put the file to my desktop I would have lost everything, not just my Unity work.
Pretty insane that this is happening and there's nothing we can do about it. This needs to be addressed immediately as it is obviously not fixed
-
willD44
Sep 12, 2024 03:41
Did this ever get fixed?
Same situation here I am on Unity 2023.3.4511 had no backup and I have not yet found a solution anywhere. Should I just accept the fact that my files are lost forever?
-
ironictonic
Jul 20, 2023 01:24
This just happened to me on 2022.3.4f1 and wiped out almost my entire home folder. Lost everything in Download and Documents. WORST BUG EVER!
-
thia1995
May 12, 2023 09:18
I have Unity version 2021.3.24f1 and just lost the complete content of my documents folder on Mac due to iOS build. I just can't believe it.
@Unity is there any chance to get all these files back? And before anyone asks: now, I dont have a backup of these files!! -
wanderingstan_unity
Aug 25, 2022 10:56
I lost 2 years of files in my Downloads folder. I use it as my scratchpad and log of things worked on. Did not expect simply choosing the wrong folder when building an iOS app wreak such havoc in my work life.
This is a horrible bug. It is inexcusable for an application to casually *DELETE* 50+ gigs of data with no warning, and not following the basic guidelines of moving this data to the Trash instead of permanently deleting.
-
zindalp
Jul 14, 2022 14:04
I have Unity version 2021.3.6f. It deleted my all data in documents and download folders completely. This is worst bug ever i faced. I lost all data because of Unity, and this is not OK from you. shame on you guys.
-
cpkcpk
Jun 15, 2022 23:51
I just built an iOS project to my Downloads folder in 2021.3.4, and it has deleted 20GB of my data.
Client work, personal projects, family photos, everything. No recent backup as I've been away on holiday. Absolutely devastating.
This is maybe the worst bug I have ever experienced, you must fix this asap.
-
Dev_Sebas
Mar 24, 2022 21:19
Hello,
I just lost my entire desktop on macOS using v2020.3.24f1, a very bad result, I'm really sad with all this situation, personal data and projects, client projects, I'm still trying to get into the new reality, plus I had no backup.
Sebastião
-
jeremyfryc
Mar 06, 2022 02:54
I have Unity version 2020.3.27f1 (in which this is supposedly fixed) and I lost everything. EVERYTHING ON MY DESKTOP! Can I stress how devastating this is? Photos of my daughter. Personal documents. EVERYTHING! What are you going to do for me to rectify this? C'mon Unity? I lost memories because of this. Not OK.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ResizeScriptingList<ScriptingObjectPtr> when passing an undeclared variable to the results parameter for GameObject.FindGameObjectsWithTag
- [Android] "Screen.safeArea.y" always returns values outside of the Safe Area when the device is in Portrait orientation
- Frame spike due to many TreeRenderer.TreeUpdated calls when repositioning terrains in large Scenes
- Crash on GameObject::RemoveComponentFromGameObjectInternal when reparenting Text GameObjects
- [IL2CPP-GarbageCollector] Changing GCMode might permanently disable GC in a multithreaded context
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a15.
Trying to build iOS Player to Desktop will cancel the build and an error will appear in the Console "Invalid build path".
Resolution Note (fix version 2021.2):
Fixed in 2021.2.8f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.27f1
Resolution Note (fix version 2019.4):
Fixed with 2019.4.35f1