Class SliderValueSetter
Sets the value of a Slider. Bind the SetValue(String) method to the OnEndEdit event of a TMP_InputField. Do NOT bind it to the OnChange event of a TMP_InputField - this will result in incorrect behavior when using a Slider OnChange to set the value of an InputField
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
SliderValueSetter
Namespace: LlamaSoftware.UI
Assembly: LlamaSoftware.UI.dll
Syntax
[RequireComponent(typeof(Slider))]
[Obsolete("SliderValueSetter is no longer required. Use EUIPSlider that includes this functionality out of the box without any manual input.")]
public class SliderValueSetter : MonoBehaviour
Methods
SetValue(String)
Bind to the OnEndEdit event of a TMP_InputField. Will set the Slider value to the value passed in.
Declaration
public void SetValue(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | new Slider value |