Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: devomage on June 07, 2014, 03:49:33 AM
-
it'd be convenient to have the ability to lock a variable to label text. i imagine this to be similar or the same (but reverse) as OnValueChange functionality.
For example if I had a menu that displays the values of variables. i could lock the Boolean value to the UILabel... or the Float in the following example. less code, more inspector goodness!
Enable run speed True
Power Regen 2.5
etc
-
Lock? What?
Isn't this just having a script output whatever value.ToString() to the label.text?
Or do you want to set the value in the inspector and parse, and set it in a "receiver" variable?
I suppose you could do something like this in a similar way that the EventDelegate exposes methods for callbacks, you could expose members for values. Not sure of the big gain in building it into the UILabels themselves though.