-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] Unity crash on symlink since 2021.2.0b14+ and 2022.1.0a9+ #61
Comments
I got stopped in my tracks due to this as well. |
just tripped on this as well |
It's now part of "Known Issues in 2021.2.0f1":
|
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>");
} |
…er to stop the crashes on startup the crashes were cause to relative path, disabling some settings helped (directory monitoring) heres the link to bugfix VeriorPies/ParrelSync#61
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!
The text was updated successfully, but these errors were encountered: