How to make an Actor visible only in a certain area of ​​the Viewport?

I found the way in here :

Material UI can’t use Custom Depth, So I make the occlude wall in front player’s camera and use it like widget.