Anyone experienced issues with randomly duplicating files in the assets folder? This has happened on the last 3 versions I have used (all 2019.2.x, currently on 2019.2.17). Usually the files being duplicated are were related to the Google Play games services plugin. I haven’t had problems with it for a couple weeks now as i was working on an iOS build, but I switched over to Android as a target, and after a failed build (missing keystore), I have 1700+ duplicate files all with a 2 in the name, this time, not including the Google play game services plugin, so I am not sure what is causing it. It seems to be a random selection of files this time around.
Right after the build failed, I got an “importing” progress bar and 999+ errors about how namespace already contains a definition for . Any ideas on how I can stop this madness? It seems to be related to android plugins/builds.
I have no idea what is causing it, but it is still happening. I am just relying on SourceTree to filter newly added files and manually going through them to see if there are any that I actually wanted to keep. Glad, but also sorry to hear, that I am not the only one.
Does Unity pause when creating the new files? Usually, duplicating a file causes a pause in Unity while it imports the file. You could try enabling the profiler and waiting for one of those pauses, and then look at the lag spike. It might get you a stack trace, or something to help you find the culprit.
Thanks for the suggestion. It only happens like once every week or two for me, but I can try leaving the profiler open to see if I can catch it. The last time it happened to me was after an Android build finished, when I clicked back onto Unity, it started importing new files. I’ll be lucky to catch it in the profiler, but will try.
That’s interesting. Makes me wonder if it has something to do with what window had focus (hierarchy vs project window). Are you referring to components on game objects when you say “scripts” or are you referring to the scripts in the “Project” window?
Sorry, I should have clarified. I mean the components on gameobjects.
At first I thought it was caused by Version Control. I don’t remember, but I think it first happened to me after opening Unity again after committing an update. I am using Unity Collaborate and Plastic SCM. But after re-reading your posts, I am also using a project targeting Android (and iOS).
Unity 2022.1 having this issue on webgl clean builds it’s creating a huge mess and it’s doing this on packages creating 2 copies of them which conflict. How do you turn this off!
Turns out it was an icloud sync problem not a unity problem. icloud was rewriting files for some weird reason. I have moved unity off the desktop and into a safe folder where icloud cannot touch it.
Yea, I was in similar situation, a lot of duplicate files found in my hard drive. I used Duplicate Files Deleter program to find and delete duplicates with good result. thanks
Uncontrolled file duplication can be frustrating and quickly overwhelm your storage. This often happens due to misconfigured sync settings, cloud storage conflicts, or software loops. To regain control, start by identifying where the duplicates are coming from—check if a backup program or cloud sync service like OneDrive, Dropbox, or Google Drive is continuously copying files. Once you’ve addressed the root cause, you can use a tool like the software DuplicateFilesDeleter to scan your system, locate exact duplicate files, and safely delete or isolate them. It’s an efficient way to clean up the mess and prevent storage bloat moving forward. Would you like help pinpointing the duplication source?