//-------------------------------------------------------------------------------------------- void OnEnable() { //Debug.Log("ONENABLE"); //instance = this; whiteBgTex = EditorGUIUtility.whiteTexture; draggingBarStyle = CreateDraggingBarStyle(); instance = this; // //getAndSortNotes (); // done as late initialization // createStyles (); // done as late initialization Repaint(); // done as late initialization UNotesHInventory.OnNoteAdded -= OnNoteAdded; UNotesHInventory.OnNoteRemoved -= OnNoteRemoved; UNotesHInventory.OnNoteAdded += OnNoteAdded; UNotesHInventory.OnNoteRemoved += OnNoteRemoved; }
static void Init() { UNotesWindow window = (UNotesWindow)EditorWindow.GetWindow(typeof(UNotesWindow), false, "UNotes Block"); window.Show(); }