diff --git a/unity.inc.php b/unity.inc.php index cd3133c..4cbc795 100644 --- a/unity.inc.php +++ b/unity.inc.php @@ -5,14 +5,15 @@ use Exception; task('unity', function() { $unity_path = guess_unity_app_dir(); + $proj_path = normalize_path(get("UNITY_ASSETS_DIR") . '/../'); if(is_win()) { $unity_app_path = "'$unity_path/Editor/Unity.exe'"; - run_background_proc($unity_app_path, ['-projectPath', '.']); + run_background_proc($unity_app_path, ['-projectPath', $proj_path]); } else { - $cmd = guess_unity_app_dir()."'Unity.app/Contents/MacOS/Unity' -projectPath . > /dev/null 2>&1&"; + $cmd = guess_unity_app_dir()."'Unity.app/Contents/MacOS/Unity' -projectPath $proj_path > /dev/null 2>&1&"; system($cmd, $res); } });