## 打包相关的API

### BuildOptions

None Perform the specified build without any special settings or extra tasks.
Development Build a development version of the player.
AutoRunPlayer Run the built player.
ShowBuiltPlayer Show the built player.
BuildAdditionalStreamedScenes Build a compressed asset bundle that contains streamed scenes loadable with the UnityWebRequest class.
AcceptExternalModificationsToPlayer Used when building Xcode (iOS) or Eclipse (Android) projects.
ConnectWithProfiler Start the player with a connection to the profiler in the editor.
AllowDebugging Allow script debuggers to attach to the player remotely.
SymlinkLibraries Symlink runtime libraries when generating iOS Xcode project. (Faster iteration time).
UncompressedAssetBundle Don’t compress the data when creating the asset bundle.
ConnectToHost Sets the Player to connect to the Editor.
BuildScriptsOnly Build only the scripts of a project.
ForceEnableAssertions Include assertions in the build. By default, the assertions are only included in development builds.
CompressWithLz4 Use chunk-based LZ4 compression when building the Player.
CompressWithLz4HC Use chunk-based LZ4 high-compression when building the Player.
StrictMode Do not allow the build to succeed if any errors are reporting during it.

### BuildPlayerOptions

assetBundleManifestPath The path to an manifest file describing all of the asset bundles used in the build (optional).
locationPathName The path where the application will be built.
options Additional BuildOptions, like whether to run the built player.
scenes The scenes to be included in the build. If empty, the currently open scene will be built. Paths are relative to the project folder (Assets/MyLevels/MyScene.unity).
target The BuildTarget to build.
targetGroup The BuildTargetGroup to build.

## shell脚本调用

### 命令行运行Unity

shell脚本中首先需要定义一些路径变量，当然这些也可以直接配置在环境变量里，包括Unity程序的位置，项目工程的目录：

## REFERENCE

https://docs.unity3d.com/Manual/CommandLineArguments.html

https://docs.unity3d.com/ScriptReference/BuildPipeline.BuildPlayer.html

https://www.jianshu.com/p/a9261113b4ac

http://www.xuanyusong.com/archives/2748

https://www.jianshu.com/p/bd97cb8042a9