Search Unity

Masking object

Discussion in '2D' started by CinkoNaap, Dec 27, 2013.

  1. CinkoNaap

    CinkoNaap

    Joined:
    Oct 2, 2011
    Posts:
    9
    Hey,

    I am wondering how can I achive a mask clip effect in Unity3D.

    What i want to achive is to set for an object ( which has a 2d renderer component ) it's mask object, so only pixles covered by mask are rendered ( and mask itself is invisible ).

    For example I have an game object called "A" with SpriteRenderer component, and game object "B" with SpriteRenderer component.
    If I set A.mask = B, I want B graphics to be invisible, and A pixels only visible if they are covered by B.