How can I "see objects behind walls" like Titanfall2's Pulse Blade?

Example of the pulse blade seeing characters behind walls:

I’m curious how to implement something like this in unity. Projector? Shader? Something else?

A custom shader is the most straightforward way to go. It can draw the enemy with a special look, and ignore the current depth buffer so that it always draws on top.

An alternate approach would be to have a second camera which matches the position of the first, is drawn on top, and clears the depth buffer, and renders only the layer containing enemies it can see. In addition, when it renders, it can use shader replacement to draw your effect, and in this case would not have to be custom-written because the “draws over the walls” part has been handled by the camera.

Which approach to take depends largely on your desired style and how much you’re willing to dive into shader coding.

Here’s a quick tutorial on the effect.

Holy crap that guy is hard core. Awesome tutorial if I can fill in the pieces. Thanks.

I ended up implementing this today. First I implemented the code from the tutorial, but it was too slow for what I was doing. Having a second camera in VR is a bad idea, I think. Then I noticed a user had posted a ZTest GEqual shader in the comments of the video. It’s a much simpler implementation, though it doesn’t look as nice for more complex models. My models are super simple, so it works fine for me. I just hacked it to suit my tastes.

I don’t understand all of the code I implemented today yet, but I’ll get there eventually.