Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Having issues finding how to do click and drag with the mouse

Discussion in 'Input System' started by CyberAngel, Sep 4, 2022.

  1. CyberAngel

    CyberAngel

    Joined:
    Oct 4, 2014
    Posts:
    125
    As the subject title suggest, all the information that I have found seems to have change as previous version around 1.1 had a drag interaction which doesn't seem to exist any more.

    So, does any oner have a click and drag mapping setup?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,393
    Did you google how to make a drag and drop system already?
    If I look for it I find many guides on how to make such a system. I looked for 'unity new input system drag and drop'
     
  3. CyberAngel

    CyberAngel

    Joined:
    Oct 4, 2014
    Posts:
    125
    The only ones I have found don't work anymore as that interaction doesn't exist.

    This is also the New Input System thread, so did you take that into consideration?
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,393
    Yes I did, hence why search result including the new input system.
    I personally never used that component, as I just made it myself. That google search gave some results:



    I also see that the new UI toolkit has drag and drop systems and in Unity UI you have the IDragHandler:
    https://docs.unity3d.com/2021.1/Documentation/Manual/UIE-Drag-Events.html
    https://docs.unity3d.com/2021.1/Documentation/Manual/SupportedEvents.html
     
  5. CyberAngel

    CyberAngel

    Joined:
    Oct 4, 2014
    Posts:
    125
    I already know how to do that, as I am not using UI or sprites I don't need IClickHandler or IDragHandler!

    What I need is the ability to set up mapping with the Input System to handle those events!
     
  6. CyberAngel

    CyberAngel

    Joined:
    Oct 4, 2014
    Posts:
    125
    And this is the thread that no longer works

    https://forum.unity.com/threads/new-input-system-mouse-press-and-hold-drag-and-move.1179283/