お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
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.
Closeシーンファイルのパスを指定して現在のシーンに加算ロードを行います
全てのパスは "Assets/MyScenes/MyScene.unity" のようにプロジェクトフォルダからの相対パスです。
// Simple script that lets you load the contents of a selected scene // to your current scene. @MenuItem("Example/Load Scene Additive") static function Apply () { var strScenePath : String = AssetDatabase.GetAssetPath(Selection.activeObject); if (strScenePath == null || !strScenePath.Contains(".unity")) { EditorUtility.DisplayDialog("Select Scene", "You Must Select a Scene!", "Ok"); EditorApplication.Beep(); return; } Debug.Log("Opening " + strScenePath + " additively"); EditorApplication.OpenSceneAdditive(strScenePath); }