From 9ea2c02dc7172df34eec54df08d4e3e7848b8615 Mon Sep 17 00:00:00 2001 From: "a.samsonkin" Date: Tue, 31 May 2022 15:08:31 +0300 Subject: [PATCH] Fixed unity task --- unity.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } });