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

Using UI Panel texture Mask in GUI

Discussion in 'Editor & General Support' started by eco_bach, Jan 30, 2017.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    First let me confirm what I am trying to do.
    Simply mask a NGUI Texture nested in a NGUI panel.

    I've done the following
    1-Selected the NGUI Panel and in the UI Panel Script set the type to Texture Mask.
    2-Created a simple bitmap that I want to use as a mask. Imported this and changed the type to Sprite(2D and UI)
    3-Dragged this new texture to the Select swatch associated with my Panel Texture Mask
    4- Changed the size to the bitmaps original pixel dimensions

    Now I assume that changing the offset values of this Texture mask should allow me to properly mask or reveal the nested NGUI texture
    But whats seems to happen is all or nothing. The moment even part of the Texture Mask is 'on top of' the nested NGUi Texture it is entirely revealed.

    I tried changing the shader for the nested NGUI Texture from Hidden/Unlit/Transparent Colored to Hidden/Unlit/Transparent Colored (texture Clip)
    Any help appreciated as this is the first time I have tried masking in NGUI and am falling behind a project launch.