Esempio n. 1
0
    private void Start()
    {
        var onValueChanged = new TMP_InputField.OnChangeEvent();

        onValueChanged.AddListener(InputPlayerSearchChanged);
        inputPlayerSearch.onValueChanged = onValueChanged;
    }
Esempio n. 2
0
 /// <summary>
 /// <para>リスナーを追加します</para>
 /// <para>この関数は AddListener 関数の省略表記です</para>
 /// </summary>
 public static void Add(this TMP_InputField.OnChangeEvent self, UnityAction <string> call)
 {
     self.AddListener(call);
 }
Esempio n. 3
0
 /// <summary>
 /// リスナーを設定します
 /// </summary>
 public static void SetListener(this TMP_InputField.OnChangeEvent self, UnityAction <string> call)
 {
     self.RemoveAllListeners();
     self.AddListener(call);
 }
Esempio n. 4
0
 public static void SetTMPInputFieldValueChangedListener(this TMP_InputField tmpInputField, UnityAction <string> callback)
 {
     TMP_InputField.OnChangeEvent valueChanged = new TMP_InputField.OnChangeEvent();
     valueChanged.AddListener(callback);
     tmpInputField.onValueChanged = valueChanged;
 }