From d73f06fec819a1197cc63043be7b036c113a293d Mon Sep 17 00:00:00 2001 From: "a.chubar" Date: Thu, 13 Mar 2025 19:07:33 +0700 Subject: [PATCH] Added unity helper method --- unity.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/unity.inc.php b/unity.inc.php index 110689c..afa192c 100644 --- a/unity.inc.php +++ b/unity.inc.php @@ -197,6 +197,20 @@ function get_unity_dir() return "$app_dir/Unity.app/Contents/"; } +function unity_build_cmd($shared_cmd) +{ + $app_dir = get('UNITY_APP_DIR'); + + if(is_win()) + $cmd = "\"$app_dir/Editor/Unity.exe\" $shared_cmd"; + else if(is_linux()) + $cmd = "\"$app_dir/Editor/Unity\" $shared_cmd"; + else + $cmd = "$app_dir/Unity.app/Contents/MacOS/Unity $shared_cmd"; + + return $cmd; +} + function mono_mcs_bin() { if(!get("USE_UNITY_MONO"))