Search Unity

How to change Stencil on Shader for Image

Discussion in 'UGUI & TextMesh Pro' started by Zaddo67, Jan 11, 2020.

  1. Zaddo67


    Aug 14, 2012
    I am completely lost, I don't know if I am even using the correct terminology. I need help please :)

    I am trying to replicate a button design that is used in the DoozyUI asset.

    I am using the same Image as the example, same UI/Default shader. But I cannot work out how the Stencil is set?

    EDIT: Found it, you need a script called "Mask" on the parent object. This will automatically clip any child objects that render outside the parent borders. (Just leaving thread, in case solution helps someone else)

    DoozyUI Example, uses a stencil on the shader.

    Attached Files:

    Last edited: Jan 12, 2020