Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Chaosgod_Espér on November 19, 2014, 04:04:08 AM
-
hi there..
Just a quick Question:
What would be the easiest way to let a Button pass ints, strings, bools, floats..etc a s argument to an onClick notifier?
Cause the "Arg 0" position in the inspector only allows Drag&Drop objects into, but not setting such values.
See:
(http://fs1.directupload.net/images/141119/rvyr3cpy.png)
http://fs1.directupload.net/images/141119/rvyr3cpy.png (http://fs1.directupload.net/images/141119/rvyr3cpy.png)
-
The property binding system that comes with NGUI doesn't let you specify values. It can only bind properties to other properties (or fields).
-
Same question, disappointing. Needed to add in something real quick to an existing UI and this would have worked great.
The new built in Unity system does it that way btw, where you can give it an int in the inspector.
My Quick Fix: I added a new component to the button that only contains a public int property. Pass the button as Arg0 and select the component and property.
(http://i.imgur.com/xepIo9i.png)