Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question TextFiled onChange event

Discussion in 'UI Toolkit' started by HRDev, Mar 16, 2022.

  1. HRDev

    HRDev

    Joined:
    Jun 4, 2018
    Posts:
    28
    Hello to everyone, how can i listen for a value change event on TextField?
    inputNomeLocation.Q(TextField.textInputUssName).RegisterCallback<InputEvent>(e => avviaTimerTestoCambiato());
     
  2. seyfe

    seyfe

    Joined:
    May 10, 2019
    Posts:
    64
    Try RegisterValueChangedCallback()
     
  3. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    340
    I think you are looking for:
    textField.RegisterCallback<ChangeEvent<string>>