EditorWindow
- autoRepaintOnSceneChange
- BeginWindows
- Close
- EndWindows
- focusedWindow
- FocusWindowIfItsOpen.<T>
- FocusWindowIfItsOpen
- Focus
- GetWindow.<T>
- GetWindowWithRect.<T>
- GetWindowWithRect
- GetWindow
- mouseOverWindow
- OnDestroy
- OnFocus
- OnGUI
- OnHierarchyChange
- OnInspectorUpdate
- OnLostFocus
- OnProjectChange
- OnSelectionChange
- position
- RemoveNotification
- Repaint
- SendEvent
- ShowAuxWindow
- ShowNotification
- ShowPopup
- ShowTab
- ShowUtility
- Show
- Update
- wantsMouseMove
EditorWindow.OnProjectChange 当项目视图改变
function OnProjectChange () : void
Description描述
Called whenever the project has changed.
只要项目被改变时调用。
Typically after import, file moves, etc.
通常情况下导入后,文件移动等
Force Sync with MonoDevelop each time the hierarchy or the project view changes.
每次层级或项目视图改变,MonoDevelop强制同步。
// Simple Editor Script that makes Unity Sync with MonoDevelop each time
// there is a change in the Hierarchy or the Project view.
//在层级或项目视图有改变,使Unity每次MonoDevelop同步
class ForceSync extends EditorWindow {
@MenuItem("Example/ForceSync When project changes")
static function Init() {
var window : ForceSync = EditorWindow.GetWindowWithRect(ForceSync, Rect(0,0,100, 100));
window.Show();
}
function OnGUI() {
if(GUILayout.Button("Sync now!"))
EditorApplication.ExecuteMenuItem("Assets/Sync MonoDevelop Project");
}
function OnHierarchyChange() {
EditorApplication.ExecuteMenuItem("Assets/Sync MonoDevelop Project");
Debug.Log("Sync");
}
function OnProjectChange() {
EditorApplication.ExecuteMenuItem("Assets/Sync MonoDevelop Project");
Debug.Log("Sync");
}
}
最后修改:2011年6月24日 Friday 16:23