EditorApplication
- applicationContentsPath
- applicationPath
- Beep
- CallbackFunction
- currentScene
- ExecuteMenuItem
- Exit
- HierarchyWindowItemCallback
- hierarchyWindowItemOnGUI
- isCompiling
- isPaused
- isPlayingOrWillChangePlaymode
- isPlaying
- LockReloadAssemblies
- modifierKeysChanged
- NewScene
- OpenProject
- OpenSceneAdditive
- OpenScene
- playmodeStateChanged
- ProjectWindowItemCallback
- projectWindowItemOnGUI
- RepaintHierarchyWindow
- RepaintProjectWindow
- SaveAssets
- SaveCurrentSceneIfUserWantsTo
- SaveScene
- Step
- timeSinceStartup
- UnlockReloadAssemblies
- update
EditorApplication.OpenSceneAdditive 打开附加路径场景
static function OpenSceneAdditive (path : string) : void
Description描述
Opens the scene at path additively.
打开在附加路径的场景。
All paths are relative to the project folder. Like: "Assets/MyScenes/MyScene.unity"
所有的路径都是相对于工程文件夹. 例如” 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);
}
最后修改:2011年6月25日 Saturday 19:56