This happens when exporting production builds repeatedly on Needle 3.47.4 beta on Unity 2023.2.20f1. I’m not sure what is locking the file, but I do one production build then after that I keep getting this error in the build logs. I’m not touching the file after the build, I even close the file explorer popup showing the dist file
The issue goes away when I close and reopen the editor, could be some error on Windows 11 where the last process locks the file and doesn’t release it for overwriting?
As soon as it happens again I will find out and report back, at first I thought it was because sometimes I test the build with VS Code Live Server but I always stop that process before rebuilding just in case. I suspect it could be that but then I have had this happen this morning without even trying VS Code, I’ll keep testing as I work.
Just reproduced it here while working after a few rebuilds, the needlescene.glb got locked, in Resource Monitor I see this, seems like two Node instances are running somehow?
Keeping an eye out for it to happen again, it seems to be spontaneous and happened yesterday when I had just the one Unity project open all morning re-exporting then eventually it happened so hoping it happens again