Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Answered] Catch Events on invisible widgets

Discussion in 'UGUI & TextMesh Pro' started by Cripplette, Sep 3, 2014.

  1. Cripplette

    Cripplette

    Joined:
    Sep 18, 2012
    Posts:
    66
    Hi,

    Is is possible to catch events on RectTransform only GameObjects ?

    I tried to add BoxCollider2D but the only way to catch events with an invisible widget is to add a 9 sliced image with a fillcenter at false (for performance) and set its alpha to 0.
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    Yes, use a Physics2DRaycaster
     
  3. Cripplette

    Cripplette

    Joined:
    Sep 18, 2012
    Posts:
    66
    Nice, thanks Tim =)