Search Unity

TMProGUI InputField interactable scripting?

Discussion in 'UGUI & TextMesh Pro' started by AviarLabs, Jun 28, 2018.

  1. AviarLabs

    AviarLabs

    Joined:
    Jun 26, 2017
    Posts:
    8
    How do you change via script the Interactable toggle for a TextMeshProGUI input field, like you can with a standard input field.

    It does not seem to be a supported...
    [
    Error CS1061: 'TextMeshProUGUI' does not contain a definition for 'interactable' and no extension method 'interactable' accepting a first argument of type 'TextMeshProUGUI' could be found (are you missing a using directive or an assembly reference?) (CS1061) (Assembly-CSharp)
    ]
     
  2. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    338
    hey liquid, you're supposed to change the object type TMP_Input.Interactable instead of the TextMeshProUGUI text inside it.
    edit. my bad, didn't see the standard there, but still interactable should be done on the input parent object instead of the children objects.
     
  3. AviarLabs

    AviarLabs

    Joined:
    Jun 26, 2017
    Posts:
    8
    ok thank you Fernando. I'll give that a try.