Closed ghost closed 2 months ago
I got stopped in my tracks due to this as well.
just tripped on this as well
I manage to get mine working by disabling Directory Monitoring under Asset Pipeline in the prefs. Symlinks does not work with it.. .
It's now part of "Known Issues in 2021.2.0f1":
Asset Import Pipeline: There is a crash in OnDemandScheduler::SetStandbyWorkerCount when opening a project with a symbolic link in it. (1370389)
I made some editor methods that just copy the project to a clone. Its not ideal as it takes much longer, but its working fine for now. Its not that bad when just syncing the scripts only and stuff. It will do for the time being anyway.
[MenuItem("Sync/All", true)]
[MenuItem("Sync/Scripts", true)]
[MenuItem("Sync/Prefabs", true)]
[MenuItem("Sync/Scenes", true)]
private static bool IsTheClone() => !Directory.GetCurrentDirectory().Contains("_clone");
[MenuItem("Sync/All")] private static void SyncProject() => SyncPath("Assets", "Packages", "ProjectSettings");
[MenuItem("Sync/Scripts")] private static void SyncScriptsFolder() => SyncPath("Assets/Scripts");
[MenuItem("Sync/Prefabs")] private static void SyncPrefabsFolder() => SyncPath("Assets/Prefabs");
[MenuItem("Sync/Scenes")] private static void SyncScenesFolder() => SyncPath("Assets/Scenes");
private static void SyncPath(params string[] paths)
{
foreach (var path in paths)
{
var oldRoot = Directory.GetCurrentDirectory();
var oldFolder = $"{oldRoot}/{path}";
var newRoot = $"{oldRoot}_clone";
var newFolder = $"{newRoot}/{path}";
// create root
Directory.CreateDirectory(newRoot);
SyncDir(oldFolder, newFolder);
}
}
private static void SyncDir(string sourcePath, string targetPath)
{
if (!Directory.Exists(targetPath))
Directory.CreateDirectory(targetPath);
// CopyFilesRecursively
//Now Create all of the directories
foreach (string dirPath in Directory.GetDirectories(sourcePath, "*", SearchOption.AllDirectories))
Directory.CreateDirectory(dirPath.Replace(sourcePath, targetPath));
//Copy all the files & Replaces any files with the same name
foreach (string newPath in Directory.GetFiles(sourcePath, "*.*",SearchOption.AllDirectories))
File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true);
Debug.Log($"Synced: <b>{sourcePath}</b> to <b>{targetPath}</b>");
}
I manage to get mine working by disabling Directory Monitoring under Asset Pipeline in the prefs. Symlinks does not work with it.. .
This also works too. Thanks for the tip :)
Describe the bug ParrelSync doesn't work with Unity 2021.2.0b14+ and 2022.1.0a9+ due to a bug in Unity.
To Reproduce Steps to reproduce the behavior:
0x00007ff762cbfee1 (Unity) OnDemandScheduler::SetStandbyWorkerCount
https://issuetracker.unity3d.com/issues/crash-on-ondemandscheduler-setstandbyworkercount-when-opening-a-project-with-a-symbolic-link-in-it It seems Unity has problem with symbolic links in latest versions. I am not sure if it's easy to workaround on ParrelSync side (probably not) so please upvote this link so that this gets Unity attention!