Search Unity

Selection problem

Discussion in 'UGUI & TextMesh Pro' started by andrenospam0, Jan 6, 2019.

  1. andrenospam0

    andrenospam0

    Joined:
    Oct 28, 2018
    Posts:
    6
    Hi.
    In Unity 2018.3 When I click on an object, the selection cycles around many other objects. All objects are side by side and on the same layer (I filtered out the other layers).
    The objects a duplicated from a prefab made of a sprite with a single TMP as a child.
    I tried to close/open the scene tab, change the layout using different presets and restart computer to no joy.
    Using hierarchy to select is a bad option for me.
    Any idea?

     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    This is an annoying problem that doesn't always have a great solution. The best advice I can give you is to keep all of your colliders and rects (from RectTransform, TextMeshPro, Canvas, etc.) as small as possible. If you click an object and the wrong one gets selected, the object that gets selected probably has a RectTransform (or collider, etc.) that is bigger than it needs to be.
     
    Walter_Hulsebos and andrenospam0 like this.
  3. andrenospam0

    andrenospam0

    Joined:
    Oct 28, 2018
    Posts:
    6
    Hi Gambit.

    I found the problem. Your post pushed me harder to find overlapping objects. I found that TMP objects were using margins (we have to open the extra settings section) so that the text was outside their rect transform. So yes the object was in fact larger than necessary. Thank you.