I’m trying to figure out how to add methods to a slider’s onChange event the problem is I have parameters in the method and how to do this properly this seems to change in different versions of NGUI I’m on 3.5.7.(I’m on 3.5.7 still for the company I’m at has custom scripts with NGUI so we haven’t bothered updating yet) I’m trying it this way:
EventDelegate.Add(slider.onChange, delegate() { Method(slider, maxVal, val); });
It adds the method that I can see in the editor but it comes out as something like (Awake)M__3 in the editor the number may vary. I also tried adding to the Eventdelegate’s parameters list but the variables available to me are different from the ones available from the codes samples I’ve seen.
The only way I can get it to work is to hard code 6 methods without parameters and pass them to their appropriate sliders onChange event.
Any suggestions before I try and update NGUI?