Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nitzamc on November 02, 2014, 11:14:33 AM

Title: on click function,function with arguments problem
Post by: nitzamc on November 02, 2014, 11:14:33 AM
i have this code :

  1. public void changescene(string sceneName)
  2. {
  3.  //blablabla
  4. }
  5.  

and i reference it on Button OnClick and the argument comes as Object :/ not a string
Title: Re: on click function,function with arguments problem
Post by: ArenMook on November 03, 2014, 06:36:35 AM
Well what did you choose for the parameter? You need to specify a property that returns a string.
Title: Re: on click function,function with arguments problem
Post by: nitzamc on November 08, 2014, 06:35:10 AM
it only takes object as argument
Title: Re: on click function,function with arguments problem
Post by: ArenMook on November 09, 2014, 09:01:52 PM
No...  it can take a string, but you need to specify a property there. You can't specify a value. For example, you can use the Component.name as the property.

Alternative is to get rid of your (string sceneName) altogether. What's the point of it there?