Search Unity

Can't click objects in Scene view with TextMeshPro in scene?

Discussion in 'UGUI & TextMesh Pro' started by SpookyCat, Jan 3, 2018.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,761
    I recently added a couple of Text Mesh Pro objects to a scene I am testing but now almost anywhere I click in the scene to pick an object it will select the Text Mesh Pro object, how do you stop that? Currently I have to disable the Text Mesh Pro objects to be able to get the click selecting to work correctly, but as soon as I turn on a TMPro object that's what I will get selected if I click in the scene.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There has been no reports of similar behavior. However, are all these objects in the same object hierarchy? This might be happening as a result of the [SelectionBase] attribute.
     
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,761
    They are in the same hierarchy yes, I have to move the whole hierarchy of screen to be able to select other objects, and I just can't select any other object in the same hierarchy as a TMPro object, this is Unity 2017.3 by the way.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you have a simple scene example that I could use to verify / test this?
     
  5. pnelsonic

    pnelsonic

    Joined:
    May 8, 2018
    Posts:
    2
    Sorry for the necro, but this issue haunts newbies on our team a lot and this is the top Google hit. For us, this issue is almost always caused by local RectTransform dimensions that are far larger than the text box. When you're working with the non-GUI version of TMP Text components with centered alignment it's easy to forget that the RectTransform dimensions and the TMPro margin handles don't do the quite the same thing.
     
    SecretCompany likes this.