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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

It's possible to call a function with 2 parameters from a OnClick() button's funciton?

Discussion in 'UGUI & TextMesh Pro' started by hugettini, Oct 7, 2014.

  1. hugettini

    hugettini

    Joined:
    Apr 1, 2013
    Posts:
    19
    Hello,

    I want to call a function with 2 parameters on it from the OnClick().

    It only appears when it have 1 parameter.

    Untitled.png
    (as you can see the function with 2 parameters are not shown on the drop down menu)

    Is there any possible way to call an N parameter function?

    Thank you!
     
  2. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    No , only with 1 or 0 param. However N param can be attached/called via script
     
  3. hugettini

    hugettini

    Joined:
    Apr 1, 2013
    Posts:
    19
    Thank you!