示例#1
0
        void Awake()
        {
#if UNITY_EDITOR
            EditorDelegates.onExampleWindowFocus     += ShowFocusedText;
            EditorDelegates.onExampleWindowLostFocus += ShowUnfocusedText;
            if (EditorDelegates.ShowExampleWindow != null)
            {
                EditorDelegates.ShowExampleWindow();
            }
#endif
        }
示例#2
0
        void Update()
        {
            var mouseOver = false;

#if UNITY_EDITOR
            if (EditorDelegates.IsMouseOverExampleWindow != null)
            {
                mouseOver = EditorDelegates.IsMouseOverExampleWindow();
            }
#endif
            m_MouseOverText.text = mouseOver ? "Mouse Over" : "Mouse Not Over";
        }
 void OnLostFocus()
 {
     EditorDelegates.OnExampleWindowLostFocus();
 }
 void OnFocus()
 {
     EditorDelegates.OnExampleWindowFocus();
 }