/// <summary>
        /// Creates a new library drop target.
        /// </summary>
        /// <param name="window">Window the drop target is part of.</param>
        public LibraryDropTarget(EditorWindow window)
        {
            parentWindow = window;

            dropTargetOS          = new OSDropTarget(window);
            dropTargetOS.OnDrag  += DoOnOSDrag;
            dropTargetOS.OnDrop  += DoOnOSDrop;
            dropTargetOS.OnEnter += DoOnOSDragEnter;
            dropTargetOS.OnLeave += DoOnOSDragLeave;

            EditorInput.OnPointerPressed  += Input_OnPointerPressed;
            EditorInput.OnPointerReleased += Input_OnPointerReleased;
            EditorInput.OnPointerMoved    += Input_OnPointerMoved;
        }
 /// <summary>
 /// Destroy the drop target. You should call this when done with the drop target.
 /// </summary>
 public void Destroy()
 {
     dropTargetOS.Destroy();
     dropTargetOS = null;
 }
Ejemplo n.º 3
0
 private static extern void Internal_CreateInstance(OSDropTarget instance, IntPtr editorWindow);