お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closelevels | 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 | 成果物の保存先のパス |
target | ビルドする BuildTarget |
options | ビルドしたプレイヤーをどのように実行するかのBuildOptions |
string エラーが発生した場合、エラーメッセージを返します。
Unityプロジェクトをビルドしてアプリケーションを作成します (Unity Pro のみ)
プログラムからUnityプロジェクトをビルドするにはこの関数を使用します。 この関数を呼び出す直前にエディタスクリプトで取得したゲームオブジェクトへの参照は、取り消されるので注意して下さい。
// Build a folder containing unity3d file and html file @MenuItem ("Build/BuildWebplayer") static function MyBuild(){ var levels : String[] = ["Assets/Scene1.unity", "Assets/Scene2.unity"]; BuildPipeline.BuildPlayer( levels, "WebPlayerBuild", BuildTarget.WebPlayer, BuildOptions.None); }