BuildPlayer(levels as string,
locationPathName as string,
target as BuildTarget,
options as BuildOptions)
||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
||The path where the application will be built.
||The BuildTarget to build.
||Additional BuildOptions, like whether to run the built player.
An error message if an error occurred.
Builds a player (Unity Pro only).
Use this function to programatically create a build of your project.
Note that any references to GameObjects acquired in the editor script
before the BuildPlayer call will be invalid after it and will need to be reacquired.