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

Vita Controls, Testing in Unity

Discussion in 'PSM' started by andyauff, May 4, 2014.

  1. andyauff

    andyauff

    Joined:
    May 4, 2014
    Posts:
    3
    Can anyone tell me how the Vita's controls are mapped to the keyboard for Unity testing? I do most testing on Vita but occasionally want to, for example, press Start or X while doing a quick test in Unity. I haven't had any luck finding info about this. Thanks for any help!
     
  2. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    Code (csharp):
    1. if (  Input.GetKeyDown(KeyCode.JoystickButton0)  ||  Input.GetKeyDown(KeyCode.X)  )
    2. {
    3. Debug.Log("do this");
    4. }
    So here you have your vita button X pressed, or keyboard button X
    Hope that helps.
     
  3. andyauff

    andyauff

    Joined:
    May 4, 2014
    Posts:
    3
    Ah, didn't even think about it that way- thanks!
     
  4. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    301
    I would recommend just using a controller since the input mappings are pretty much identical and would allow for you to get a feel for how your product is feeling with those kinds of controls.
     
  5. andyauff

    andyauff

    Joined:
    May 4, 2014
    Posts:
    3
    Thanks for the tip. It's not really necessary for me at this point, but I'll keep it in mind.