-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunity.bash
More file actions
46 lines (34 loc) · 1.03 KB
/
unity.bash
File metadata and controls
46 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
: "${UNITY_PROJECT_PATH:=.}"
unity::help() {
cat << 'EOF'
template:
UNITY_PROJECT_PATH=. # default
UNITY="/Applications/Unity/Hub/Editor/2021.2.7f1/Unity.app/Contents/MacOS/Unity"
secrets:
UNITY_SERIAL
UNITY_USER
UNITY_PASSWORD
usage:
batchmode [<batchmode-arguments>] open Unity in batchmode and quit
execute_method [<batchmode-arguments>] open Unity in batchmode, execute the specified method and quit
e.g. bee unity execute_method Build
sync_solution [<batchmode-arguments>] open Unity in batchmode, sync C# project and quit
requirements:
Unity https://unity3d.com
EOF
}
unity::batchmode() {
"${UNITY}" \
-projectPath "${UNITY_PROJECT_PATH}" \
-batchmode \
-nographics \
-logfile \
-serial "${UNITY_SERIAL}" -username "${UNITY_USER}" -password "${UNITY_PASSWORD}" \
-quit "$@"
}
unity::execute_method() {
unity::batchmode -executeMethod "$@"
}
unity::sync_solution() {
unity::execute_method UnityEditor.SyncVS.SyncSolution "$@"
}