Sprite masks not working.

I have some prefabs which contain masks, these masks normally work throughout except when the object is over one of my background tilemap layers which are controlled by an overlapping mask layer which essentially provides the layer with a tiled texture.

My prefabed object’s masks work perfectly when not over this tilemap layer, and I think they must get confused by the mask otherwise.

The background is using a material : Sprites/Stencil Mask Main

I guess, this is less of a bug and more of a question, how would I go about making this material only effect a specific layer.

Hello,

To get a mask to only affect a specific layer, you can enable the Custom Range option and select the custom sorting layer and order in layer that it affects
More details here: Unity - Manual: Sprite Masks

If that does not work and you think its a valid bug do use the Unity built-in bug reporter to file a ticket with your reproducible bug project attached, let us know the ID and we can have a better look