> For the complete documentation index, see [llms.txt](https://yapi-plugin.gitbook.io/easy-drag-and-drop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yapi-plugin.gitbook.io/easy-drag-and-drop/quick-start.md).

# Quick Start

### Drag and Drop Plugin Include 2 Main Core Script

&#x20;![](/files/MqhwWAjgPcKyEDhbqxGn)

&#x20;   **DragObj** - Drag this c# script into the UI Element to drag the element.

&#x20;    **DropSlot** - Drag this c# script into the UI Element to drop the Drag object

![Example Drag and Drop GIf](/files/PJBhNAOTlGZEZRQ1Grv8)

### - DragObj -

![](/files/WvmWbLEj1Y2X623e6Lyz)

<details>

<summary> <strong>DropObj Set-up Variable Description</strong></summary>

#### - Main Canvas Name -

The main canvas name of the drag object, this is require for the raycast pointer.

![](/files/9A6WbtKUGK8NA5vlqvIO)

#### - Is Return Position -

True - the draggable object will return to it original position.

False - the draggable object will stay at the pointer drop position.

#### - Drop As First Sibling -

True - the draggable object will become a first sibling of the drop parent

False - the draggable object will be the last sibling of the drop parent.

#### - Obj Info Component -

A c# script component that containt the data structure of the draggable object. It will be store inside the DragObj and thus pass it to DropSlot for further usage.

</details>

### - DropSlot -

![](/files/2kkG4RsTX2YF5dLYxh0m)

<details>

<summary>DropSlot Set-up Variable Description</summary>

#### - Main Canvas Name -

The main canvas name of the drag object, this is require for the raycast pointer.

#### - Set Drop Obj Parent -

True - the draggable object change it parent to **Parent Location**

False - the draggable object will remain it original parent when drop.

#### - Set Drop Object Position -

True - the draggable object change it position to drop slot transform position

False - the draggable object will return to its original position

</details>

<details>

<summary>DropSlot Inherient</summary>

Luckily, You can easily inherient the **DropSlot** script for further usage.

Example of inherient script in the demo scene:

```csharp
public class DropSlotDemo : DropSlot
    {
        public DataInfoDemo dataInfoDemo;
        public bool isOverrideOnDrop = true;
        public override void OnDrop(PointerEventData eventData)
        {
            base.OnDrop(eventData);
            if (!isOverrideOnDrop) return;
            var model = (DataInfoDemo) DropObj.m_ObjInfoComponent;
            dataInfoDemo.Initialize(model);
        }
    }

```

</details>
