Strange file duplication (2021.216f1 - macOS - apple silicon)

I’ve noticed that, after working in a project for a while, I start seeing odd behavior where files get duplicated, seemingly at random with numeric suffixes.

For example, opening a sandbox project that I had been working with, I simply duplicated an existing object and for some reason my ‘NavMesh’ file was duplicated as ‘NavMesh 2’ (with a ‘NavMesh.asset 2.meta’ file). The original ‘NavMesh’ file was still there, and seems to still be the main file.

Other files have been duplicated, also, and I found a ‘ProjectSettings/PackageManagerSettings 3.asset’ as well. In one other project, I ended up having a bunch of my asset subdirectories duplicated, too, for seemingly no reason.

I’m still trying to understand what I may be doing that is causing/has caused this, but it’s getting annoying. Has anyone else seen this behaviour? Can anyone advise me on what I may be doing that is causing this?

Sounds like you’re using a service like Dropbox or myDrive or something. Those absolutely are NOT suitable for Unity. Use proper source control to guard your work and share it across multiple computers.

1 Like

Ha… Now that you mention it, I can see why that might cause a problem. I am using a directory on iCloud Drive, so that may indeed be the issue. I’ll try moving the working directory over to a non-shared location.

The good news is that I am already using github to store my projects, which is handy when I want to load them up on my Windows machine.

Thanks for the tip, Kurt. I appreciate it. :slight_smile:

1 Like