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 3
3
using System . Runtime . InteropServices ;
4
4
using System . Text ;
5
5
using System . Collections . Generic ;
6
+ using System . Linq ;
6
7
using UnityEditor ;
7
8
using UnityEngine ;
8
9
@@ -569,6 +570,31 @@ internal static string FindUvPath()
569
570
}
570
571
catch { }
571
572
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
+
572
598
candidates = new [ ]
573
599
{
574
600
// Preferred: WinGet Links shims (stable entrypoints)
You can’t perform that action at this time.
0 commit comments