@@ -9,13 +9,14 @@ public static class PythonLifeCycle
99 private const string PythonFolder = "python-3.11.3-embed-amd64" ;
1010 private const string PythonDll = "python311.dll" ;
1111 private const string PythonZip = "python311.zip" ;
12- private const string PythonProject = "myproject" ;
12+ private const string MyProject = "myproject" ;
13+ private const string TestProject = "test_project" ;
1314
1415 [ RuntimeInitializeOnLoadMethod ( RuntimeInitializeLoadType . BeforeSceneLoad ) ]
1516 private static void PythonInitialize ( )
1617 {
1718 Application . quitting += PythonShutdown ;
18- Initialize ( PythonProject ) ;
19+ Initialize ( ) ;
1920 }
2021
2122 private static void PythonShutdown ( )
@@ -24,12 +25,16 @@ private static void PythonShutdown()
2425 Shutdown ( ) ;
2526 }
2627
27- public static void Initialize ( string appendPythonPath = "" )
28+ public static void Initialize ( )
2829 {
2930 var pythonHome = $ "{ Application . streamingAssetsPath } /{ PythonFolder } ";
30- var appendPath = string . IsNullOrWhiteSpace ( appendPythonPath ) ? string . Empty : $ "{ Application . streamingAssetsPath } /{ appendPythonPath } ";
31+ var myProject = $ "{ Application . streamingAssetsPath } /{ MyProject } ";
32+ var testProject = $ "{ Application . streamingAssetsPath } /{ TestProject } ";
3133 var pythonPath = string . Join ( ";" ,
32- $ "{ appendPath } ",
34+ $ "{ myProject } ",
35+ #if UNITY_EDITOR
36+ $ "{ testProject } ",
37+ #endif
3338 $"{pythonHome}/Lib/site-packages" ,
3439 $ "{ pythonHome } /{ PythonZip } ",
3540 $ "{ pythonHome } "
0 commit comments