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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

[Suggestion] Rename Button.onClick to Button.onSubmit

Discussion in 'UGUI & TextMesh Pro' started by Senshi, Aug 26, 2014.

  1. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    552
    Hi,

    I'm currently working on a character selection screen where the user controls a grid-based cursor controlled by key input, instead of a mouse. It took me a bit to figure out that I can just add my OnSubmit() delegate to a Button's onClick property, as I assumed it was specific for (pointer) clicks, essentially being a shorthand for EventTriggerType.PointerClick. Renaming it to onSubmit would also make it more consistent with InputField (and possibly others? I haven't checked.).

    Cheers,
    Patrick
     
    hichanbis likes this.