File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
UnityMcpBridge/Editor/Helpers Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 33using System . Runtime . InteropServices ;
44using System . Text ;
55using System . Collections . Generic ;
6+ using System . Linq ;
67using UnityEditor ;
78using UnityEngine ;
89
@@ -569,6 +570,31 @@ internal static string FindUvPath()
569570 }
570571 catch { }
571572
573+ // Windows Store (PythonSoftwareFoundation) install location probe
574+ // Example: %LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.13_*\LocalCache\local-packages\Python313\Scripts\uv.exe
575+ try
576+ {
577+ string pkgsRoot = Path . Combine ( localAppData , "Packages" ) ;
578+ if ( Directory . Exists ( pkgsRoot ) )
579+ {
580+ var pythonPkgs = Directory . GetDirectories ( pkgsRoot , "PythonSoftwareFoundation.Python.*" , SearchOption . TopDirectoryOnly )
581+ . OrderByDescending ( p => p , StringComparer . OrdinalIgnoreCase ) ;
582+ foreach ( var pkg in pythonPkgs )
583+ {
584+ string localCache = Path . Combine ( pkg , "LocalCache" , "local-packages" ) ;
585+ if ( ! Directory . Exists ( localCache ) ) continue ;
586+ var pyRoots = Directory . GetDirectories ( localCache , "Python*" , SearchOption . TopDirectoryOnly )
587+ . OrderByDescending ( d => d , StringComparer . OrdinalIgnoreCase ) ;
588+ foreach ( var pyRoot in pyRoots )
589+ {
590+ string uvExe = Path . Combine ( pyRoot , "Scripts" , "uv.exe" ) ;
591+ if ( File . Exists ( uvExe ) && ValidateUvBinary ( uvExe ) ) return uvExe ;
592+ }
593+ }
594+ }
595+ }
596+ catch { }
597+
572598 candidates = new [ ]
573599 {
574600 // Preferred: WinGet Links shims (stable entrypoints)
You can’t perform that action at this time.
0 commit comments