internal static bool ShowAtPosition(Rect buttonRect) { if (DateTime.Now.Ticks / 10000L < s_LastClosedTime + 50L) return false; if (Event.current != null) Event.current.Use(); if (s_SpriteEditorMenu == null) s_SpriteEditorMenu = ScriptableObject.CreateInstance<UIEditorMenu>(); s_SpriteEditorMenu.Init(buttonRect); return true; }
private void OnDisable() { Undo.undoRedoPerformed -= new Undo.UndoRedoCallback(this.UndoRedoPerformed); s_LastClosedTime = DateTime.Now.Ticks / 10000L; s_SpriteEditorMenu = null; }