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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

[WIP] Cross-platform Input

Discussion in 'General Discussion' started by gamesurgeon, Sep 30, 2010.

  1. gamesurgeon

    gamesurgeon

    Joined:
    Oct 11, 2009
    Posts:
    427
    How interested would the community be in cross-platform input? For example, you could call a function :

    Code (csharp):
    1. userInput.DoubleClick()
    And the script would first check which device you are using and properly return the correct value. As of now I'm thinking of implementing :

    Code (csharp):
    1. function LeftClick () {
    2.    
    3. }
    4.  
    5. function RightClick () {
    6.    
    7. }
    8.  
    9. function MiddleClick () {
    10.    
    11. }
    12.  
    13. function DoubleClick () {
    14.    
    15. }
    16.  
    17. function Drag () {
    18.    
    19. }
    20.  
    21. function Twist () {
    22.    
    23. }
    24.  
    25. function Hover () {
    26.    
    27. }
    28.  
    29. function GetInputPosition () {
    30.    
    31. }
    Some functions, such as Drag and Twist, will have a lot more functionality, considering their complexity. I'm thinking of putting it up for a small price when I'm done -- its main purpose to assuage the hassle of cross platform development. Would people be interested in purchasing this?
     
    Last edited: Sep 30, 2010