Hello, I need to make a blind effect (turn the whole screen black but an area around the player) and I tried to use the SpriteMask by simply setting the Sprite Renderer’s Mask Interaction to “Visible Inside Mask” and it did the trick.
The problem is now my sprite is no longer visible because the option makes it visible ONLY inside a SpriteMask, so if there isn’t a SpriteMask in the scene, the Sprite disappears…
Is there a way to fix this or should I ditch the thing?
Any alternative solution beside making a big black sprite with a hole in it?
I think what you’re saying is that when you apply your solution for a spotlight effect (a good solution), it messes up visibility for areas that should not have the effect. Is this correct?
If so, you could have the behavior scripts for objects that can be in both areas change their masking mode based on triggers that the player passes through to enter/exit these areas.
I guess that using positive masking using a box with a hole in it would work too. There are some other minor annoyances you’d need to work around, like screen size/resolution.