Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Possible to set a UI component to non interactive?

Discussion in 'UGUI & TextMesh Pro' started by GiantGrey, Aug 22, 2014.

  1. GiantGrey

    GiantGrey

    Joined:
    Jul 2, 2012
    Posts:
    261
    is it possible to set a ui component to not listen to mouse inputs? like non interactive or something? So all inputs will go through the next underlying component?

    for example i have a scroll panel and an additional panel on top of that with a border slice image. Because i want to have a border image for the scroll panel. But as long as this top panel is enabled the scrolling does not work. I can not set an image for the scroll panel because this one uses a mask.
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,165
    You can add a CanvasGroup component then tick the 'Blocks Raycasts'. This will mean that raycasts can't hit anything underneath or on the group.
     
    FredMastro and v-strelchenko like this.
  3. GiantGrey

    GiantGrey

    Joined:
    Jul 2, 2012
    Posts:
    261
    perfect! :) thank you! And thanks for commenting all thread posts! Really great support!
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,165
    I'm taking notes as I go :)