Author Topic: Exception with UISlider and UICheckbox  (Read 3447 times)

asalga

  • Guest
Exception with UISlider and UICheckbox
« on: July 04, 2013, 11:43:06 AM »
Hi,
I recently upgraded to NGUI 2.6.3 and I now receive an exception occurring on this line of UISlider:

  1. eventReceiver.SendMessage(functionName, stepValue, SendMessageOptions.DontRequireReceiver);
  2.  

  1. MissingMethodException: The best match for method SliderActions has some invalid parameter.
  2. System.MonoType.InvokeMember (System.String name, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object target, System.Object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParameters) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System/MonoType.cs:520)
  3. UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable)
  4. UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
  5. UISlider:Set(Single, Boolean) (at Assets/NGUI/Scripts/Interaction/UISlider.cs:334)
  6. UISlider:Start() (at Assets/NGUI/Scripts/Interaction/UISlider.cs:158)
  7.  
I get a similar exception in UICheckbox as well.

Any idea what could be causing this?

Thanks!
« Last Edit: July 04, 2013, 11:57:24 AM by asalga »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exception with UISlider and UICheckbox
« Reply #1 on: July 04, 2013, 11:59:13 AM »
Go to your "functionName" function -- whatever it's pointing to. It's expecting it to be "void YourFunctionName (float sliderValue)". This error will occur if it's something else, such as "void YourFunctionName()"