|
Name | Description |
---|---|
levels | 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). |
locationPathName | The path where the application will be built. Must include any necessary file extensions, like .exe, .app, .unity3d or .wdgt. |
target | The BuildTarget to build. |
options | Additional BuildOptions, like whether to run the built player. |
string - an error message if an error occurred.
Builds a player (Unity Pro only).
Use this function to programatically create a build of your project.
When BuildOptions.BuildAdditionalStreamedScenes is used, the resulting file will not be a traditional player. The result will be a file that can be dynamically loaded in at runtime. In order to dynamically load one of these extra scenes in, download the file using the WWW class, and make sure to call WWW.assetBundle. You don't actually have to call AssetBundle.LoadAll(). As soon as you assigned WWW.assetBundle to a variable, from that point on, you can use regular Application.LoadLevel() and Application.LoadLevelAdditive() calls to load the level as you would usually do.