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.currentScene 当前场景
static var currentScene : string
Description描述
The path of the scene that the user has currently open (Read Only)
用户当前打开场景的路径(只读)
All paths are relative to the project folder. Like: "Assets/MyScenes/MyScene.unity"
所有的路径都是相对于工程文件夹, 例如” Assets/MyScenes/MyScene.unity”
// saves the current scene into a new temporary scene.
//存当前场景到一个新的临时场景
import UnityEditor;
@MenuItem ("Example/Save temp Scene %s")
static function SaveTempScene() {
var path : String [] = EditorApplication.currentScene.Split(char.Parse("/"));
path[path.Length -1] = "Temp_" + path[path.Length-1];
EditorApplication.SaveScene(String.Join("/",path));
}
最后修改:2011年6月25日 Saturday 18:32