Sprite mask and tiled sprite

I have a sprite that has its draw mode set to Tiled. I would like to attach a sprite mask to this sprite to apply a simple effect when characters walk in front of that sprite, but the sprite mask needs to apply to the entire, tiled sprite.

There doesn’t seem to be a way to tile the mask, though.

Is there a way of doing this?

Doesn’t seem like there’s a way to do exactly that. I ended up writing a custom shader to write to the stencil buffer while rendering the tiled sprite. This works fine for my purposes, but might not be as flexible as Unity’s sprite mask.