You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-14 22:30:10 +00:00
Support macos and linux
This commit is contained in:
@@ -125,7 +125,17 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
var workspaces = new List<string>();
|
||||
var userProfile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
var cursorStoragePath = Path.Combine(userProfile, "AppData", "Roaming", "cursor", "User", "workspaceStorage");
|
||||
string cursorStoragePath;
|
||||
|
||||
#if UNITY_EDITOR_OSX
|
||||
cursorStoragePath = Path.Combine(userProfile, "Library", "Application Support", "cursor", "User", "workspaceStorage");
|
||||
#elif UNITY_EDITOR_LINUX
|
||||
cursorStoragePath = Path.Combine(userProfile, ".config", "cursor", "User", "workspaceStorage");
|
||||
#else
|
||||
cursorStoragePath = Path.Combine(userProfile, "AppData", "Roaming", "cursor", "User", "workspaceStorage");
|
||||
#endif
|
||||
|
||||
Debug.Log($"[Cursor] Looking for workspaces in: {cursorStoragePath}");
|
||||
|
||||
if (Directory.Exists(cursorStoragePath))
|
||||
{
|
||||
@@ -186,6 +196,10 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[Cursor] Workspace storage directory not found: {cursorStoragePath}");
|
||||
}
|
||||
|
||||
return workspaces.Distinct().ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user