VeriorPies / ParrelSync

(Unity3D) Test multiplayer without building
MIT License
4.51k stars 318 forks source link

[BUG] Try to copying com.unity.collections asmdef but file could not find #47

Closed csritter closed 2 years ago

csritter commented 3 years ago

I'm trying to use ParrelSync in my project, but this error occurs: FileNotFoundException: Could not find file "\Project\Library\PackageCache\com.unity.collections@0.14.0-preview.16\Unity.Collections.LowLevel.ILSupport\source~\Unity.Collections.LowLevel.ILSupport.CodeGen\Unity.Collections.LowLevel.ILSupport.CodeGen.asmdef'. Somehow he didn't find the file.

Steps to reproduce the behavior:

  1. Download "com.unity.collections" (using 0.14v - https://docs.unity3d.com/Packages/com.unity.collections@0.14/manual/index.html) in PackageManager
  2. Try to clone with ParrelSync

Expected behavior Found the file and copy properly the project.

Enviroment (please complete the following information):

314pies commented 3 years ago

Hi csritter, Thanks for reporting issue. Will take a deeper look later.

rolandsmeenk commented 3 years ago

I believe this happens due to a path length limitation issue in Unity on Windows. (See https://forum.unity.com/threads/directorynotfoundexception-caused-by-windows-path-length-limit-and-addressables-during-build.1026655/)

If this happens file.Length can not be used. I made a quick fix by placing the file.Length access in GetDirectorySize and CopyDirectoryWithProgressBarRecursive inside a try catch and then the cloning proceeds.

csritter commented 3 years ago

@rolandsmeenk Sorry for later answer, its a good possibility, I can try later. If you tested it, and it worked, submit a pr. Thanks!

314pies commented 3 years ago

Hi csritter , I just try to reproduce this issue by installing Unity Collections Package and create a clone of the project. It works quite normally on my side. Any more details you can provide? And if possible, would you mind sharing your project folder to help us find out the problem?

314pies commented 3 years ago

And btw, are you using windows 10 or windows 7?

csritter commented 2 years ago

@314pies Sorry for the delay, I was on vacation.

Hi csritter , I just try to reproduce this issue by installing Unity Collections Package and create a clone of the project. It works quite normally on my side. Any more details you can provide? And if possible, would you mind sharing your project folder to help us find out the problem?

I dont have permission to share the project Im working on. But I can try to build an example, I just do not know when.

And btw, are you using windows 10 or windows 7?

Windows 10 21H1