public void OnEnable()
 {
     System.Reflection.FieldInfo        info  = typeof(EditorApplication).GetField("globalEventHandler", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
     EditorApplication.CallbackFunction value = (EditorApplication.CallbackFunction)info.GetValue(null);
     value += HandleDeleteEvent;
     info.SetValue(null, value);
     InitComponents();
     request = AsyncRequest.Get(clip.uuid);
     if (request != null && !AsyncRequest.refreshing)
     {
         AsyncRequest.RegisterRefreshEvent();
     }
     haveUserData = !string.IsNullOrEmpty(clip.userdata);
     drawer.Refresh();
     Repaint();
 }
예제 #2
0
 /// <summary> Called when the window is show. </summary>
 private static void EnableOneShot()
 {
     drawer.Refresh();
 }