Search Unity

  1. Unity 2019.1 beta is now available.
    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. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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:
    259
    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.