Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Using GetKeyDown on a certain Input type

Discussion in 'Getting Started' started by Shadowing, Jan 31, 2015.

  1. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,320
    Quick question.

    I have two InputFields and a button on a canvas
    I want to use Input.GetKeyDown on just the button?
    How do I go about selecting just the button. One idea is to just create a tag for this but I'm thinking there is probably a better way to do this.

    Much Thanks