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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Unity Input Manager

Discussion in 'Scripting' started by RavikantSharma, Jul 10, 2014.

  1. RavikantSharma

    RavikantSharma

    Joined:
    Nov 22, 2013
    Posts:
    7
    Hi Friends,
    I have a project completely working with mouse. I have used mouse button events for all my code.
    Now I need to port it to a different device that has customized input device that works quite like mouse but the API is different.
    Now just as a thought rather then modifying all the code I want to create a script that runs my custom event for all the mouse button events in script. So that whenever I have a mouse button event passed as input it runs my custom event in place of mouse button event, or if possible run multiple events for the same.

    Ravi
     
  2. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
  3. Arunraj

    Arunraj

    Joined:
    Jul 4, 2012
    Posts:
    21
    In PC/WEB: In case of touch screen, mouse events will work as the same. no change needed.
    In Device: u have to rewrite events according to the events functions.

    Check this
     
    Magiichan likes this.
  4. RavikantSharma

    RavikantSharma

    Joined:
    Nov 22, 2013
    Posts:
    7
    Thanks for reply friends
    I will try