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 编辑器应用程序
Main Application class.
主应用程序类。
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
注意:这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。
Class Variables类变量
-
The path of the scene that the user has currently open (Read Only)
用户当前打开场景的路径(只读) -
Is editor currently in play mode?
编辑器当前是否在播放模式? -
Is editor either currently in play mode, or about to switch to it? (Read Only)
当前编辑器是否在播放模式或者即将切换到播放模式(只读)。 -
Is editor currently paused?
当前编辑器是否暂停? -
Is editor currently compiling scripts? (Read Only)
当前编辑器是否在编译脚本(只读)? -
Path to the Unity editor contents folder (Read Only)
到Unity编辑器内容文件夹的路径(只读)。 -
Returns the path to the Unity editor application (Read Only)
返回Unity编辑器应用程序的路径(只读)。 -
Delegate for OnGUI events for every visible list item in the ProjectWindow.
委托用于OnGUI事件在项目窗口每个可见列表项。 -
Delegate for OnGUI events for every visible list item in the HierarchyWindow.
委托用于OnGUI事件在层级窗口每个可见列表项。 -
Delegate for generic updates.
通用更新的委托。 -
Delegate for changed keyboard modifier keys.
用于改变的键盘修改键(组合键)的委托。 -
Delegate for play mode state changes.
对播放模式状态改变的委托。 -
The time since the editor was started (Read Only)
从编辑器打开至今的时间(只读)。
Class Functions类函数
-
Create a new scene // 创建一个新的场景。
-
Opens the scene at path. // 打开指定路径下的场景。
-
Opens the scene at path additively.
打开在附加路径的场景。 -
Save the scene at path. // 保存场景到指定路径。
-
Ask the user if he wants to save the open scene.
询问用户是否要保存当前场景。 -
Open another project. // 打开另外一个工程。
-
Saves all serializable assets that have not yet been written to disk (eg. Materials)
保存所有未写入磁盘可序列化的资源(例如,材质)。 -
Perform a single frame step.
执行单帧。就是一帧一帧的执行。 -
Prevents loading of assemblies when it is inconvenient.
当编辑器不便时,阻止加载程序集。 -
Invokes the menu item in the specified path.
调用指定路径的菜单项。 -
Must be called after LockReloadAssemblies, to reenable loading of assemblies.
必须在LockReloadAssemblies之后调用,用来重新激活加载程序集。 -
Exit the Unity editor application.
退出Unity编辑器程序。 -
Can be used to ensure repaint of the ProjectWindow.
可以用来确保项目窗口重绘。 -
Can be used to ensure repaint of the HierarchyWindow.
可用来确保层级窗口重绘。 -
Plays system beep sound. // 播放系统鸣叫。
Delegates委托
-
Delegate to be called for every visible list item in the ProjectWindow on every OnGUI event.
委托调用用于在ProjectWindow每个OnGUI事件上每个可见列表项。 -
Delegate to be called for every visible list item in the HierarchyWindow on every OnGUI event.
委托调用用于在HierarchyWindow每个OnGUI事件上每个可见列表项。 -
Delegate to be called from EditorApplication callbacks.
委托需从EditorApplication回调调用。
最后修改:2011年10月2日 Sunday 11:24