Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TMProGUI InputField interactable scripting?

Discussion in 'Unity UI & TextMesh Pro' started by liquidbuddha, Jun 28, 2018.

  1. liquidbuddha

    liquidbuddha

    Joined:
    Jun 26, 2017
    Posts:
    3
    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:
    188
    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. liquidbuddha

    liquidbuddha

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