http://blog.sina.com.cn/s/blog_471132920102vlie.html
(2)Shell
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectpath /Users/luoshengyu/autoBuild -executeMethod BuildApp.BuildOp
(3)傳遞參數
Shell可以向Unity傳遞參數,在Unity中可通過 System.Environment.GetCommandLineArgs(); 得到shell參數。
例如
string[] strs = System.Environment.GetCommandLineArgs();
foreach(var s in strs)
{
if(s.Contains("-arg:"))
{
string arg = s.Split(':')[1];
//處理參數//
}
}
Unity命令行文檔: