1 / 11

How to Implement Vertical ‘Drag n Drop’ in Unity

In this document, we are going to learn “How to Implement Verticle Drag & Drop Listiew in Unity”.<br><br>This script which we developed can work listview verticle drag & drop. For further detail read more: https://apptraitsolutions.com/vertical-drag-drop-listview-unity/<br>Please watch this video and I’m sure you will definitely get an awesome tutorial on how to implement verticle drag & drop listview in Unity. <br>For more kind of tutorial videos “stay connected, stay subscribed to our channel: https://www.youtube.com/channel/UCObygHHOCTB2goktKZifYOQ<br>If you want to get in personal touch with us,<br>Reach us at: https://apptraitsolutions.com

Télécharger la présentation

How to Implement Vertical ‘Drag n Drop’ in Unity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recently we were asked to develop a vertical listview with drag and drop feature in one of our key project called TriviaMake™. TriviaMaker is custom quiz maker that available on Android, iOS, and Web. We have searched on Unity documentation for existing component also there isn’t any custom asset available on unity asset store, so we ended up with developing a custom component for the Unity platform. As per our requirements, User can rearrange quiz categories with drag and drop gesture. We found some solutions but none of them were perfect and were too buggy. The script which we have developed can work with any type of vertical drag. So let’s begin to our tutorial by downloading the drag and drop unity script which we developed from GitHub.

  2. Step 1 Create a sample 2D project.

  3. Step 2 Create a parent panel that contains draggable items.

  4. Step 3 Add Vertical Layout Group on a parent panel for arranging all child in a vertical. Please notice that this method is only for vertical drag and drop.

  5. Step 4 Now, Create child items that you will use for drag. Here I created color blocks because those are easy to visualize.

  6. Step 5 Add the script to your project. Now you noticed that I added the script on my items because I use a full item for drag. You can add a script on a particular button that uses for drag item.

  7. Step 6 Now, Bind your item Transform into the CurrentTransform variable. If you use a button for drag then add a script into a button and bind item Transform into the CurrentTransform variable.

  8. Step 7 So that’s it! Now, Run your project and you can test a complete drag and drop feature.

  9. We At AppTrait Solutions, As a Unity Game Development Company in India, our 2D & 3D unity game developers will help you to develop 2D or 3D games for game lovers. We offer game development services using Unity framework for popular platforms like iOS, Android, Mac, Windows and more.

More Related