Search Unity

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,648
    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