The process cannot access the file because it is being used by another process. 0 file(s) copied.

Hello there.

I have been receiving this issue consistently for many months now. After being unable to resolve it myself, I finally decided to open up a thread.

Here’s what happens.

Sometimes, if I save a script in VSCode, then switch back to Unity, it will fail to compile and spit out this error message.
7963542--1020846--upload_2022-3-14_15-30-28.png

At this time, the error cannot be cleared from the console. In order to recompile, I will first need to save my scene. Then, I need to reload my scene (either through script or manually re-opening the scene through the project window). Next, I need to locate the folder that the script was in and choose “Reimport” on the entire folder. This will force Unity to recompile, and the error will go away.

Now that’s nice and dandy. However, what if, you’re making lots of small tweaks to a script, and you are constantly interrupted by this… that’s not so nice and dandy. It’s very annoying, to put it mildly.

That being said, I placed this thread in the Plastic SCM section because I assume plastic is doing something to interrupt the file access. This issue has persisted through every update (VSCode and Plastic) that I’ve had. Although, to my recollection, this did not exist prior to my upgrade to 2021.1 from 202.2.1f1. I can potentially attempt upgrading to the latest version, but I’d like to avoid that for now.

I’d like to never see this error again. Does anyone know how to do that?

Hi @JustJunuh , I’m sorry you’ve been experiencing this irritating issue. Are you currently using Plastic SCM for your source control? If you aren’t, then have you tried removing the Version Control package via the Package Manager to see if you still experience the error? I’d like to confirm for sure that this error is related to Plastic SCM and, if it is, what we can do to reproduce it so that we can fix it.

Is there a longer stack trace for this Console error?

1 Like

There is no stack trace in the console. That has been one of the difficulties with trying to pin down the source of this issue.

I removed the Version Control package from the package manager, and I did keep getting errors. I also tried compiling with the Plastic SCM standalone window open and closed, and I kept getting the error regardless. Also, in VSCode, I removed the Plastic SCM extension, and I still got the error.

So I guess the issue is independent of all that and might not have to do with Plastic… :roll_eyes:

But, if the VC package has nothing to do with it, VSCode’s Plastic extension isn’t causing it, then what else could be going on here?

I guess we’re off-topic now :frowning:

I’m sorry that we couldn’t nail down the exact cause of the issue you’re experiencing. If you’d like, I could move this thread into the Editor and General Support thread to see if anyone there has experienced this issue before.

1 Like

Yes please!

Update on this story. I recently upgraded to 2022.1.18f1 and upgraded my Plastic as well. We now have the PlasticSCM Unity package installed and working in the editor too. For whatever reason, that random bug has gone away entirely. Not sure what did it, but it is fixed now :slight_smile: