Search Unity

TextMesh Pro How to properly get TMP links from TMP_Input?

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by MrLucid72, Sep 13, 2019.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    633
    Do I get them from the parent Input or the child UGUI ? I may be able to answer my own question soon, but I'm having a strong feeling from initial tests that BOTH answers are wrong -- maybe finding the intersection on a TMP_Input requires additional steps?

    I got this working fine on a regular UGUI, but haven't issues with TMP_Input.



    (^ typeLink style worked in a regular UGUI)

    EDIT: I noticed txtInput.textComponent != UGUI: it's a TMP_Text -- does this make a diff?

    EDIT 2: Tried txtInput.textComponent.GetComponent<TMP_InputField>() found from here to specifically get the UGUI to test a difference. Nah didn't work :( so tried this way + finding the link from the UGUI child -- both no dice. Seems like there's something weird going on with TMP_INPUT's that don't allow links. Would love a workaround or advice :)
     
    Last edited: Sep 13, 2019