How to outline characters OnMouseOver in a RTS

I got it working and here is how I did it:

Basically I made the material so that it has 6 “states”

1: Always Show Outline but show Occlusion Fill only when occluded in Ally color
2: Always Show Outline but show Occlusion Fill only when occluded in Enemy color
3: Always Show Outline but show Occlusion Fill only when occluded in Neutral color

4: Show Outline and Occlusion Fill in Ally color only when occluded
5: Show Outline and Occlusion Fill in Enemy color only when occluded
6 Show Outline and Occlusion Fill in Neutral color only when occluded

From here I determine what state the character should be using by switching the Custom Depth Stencil value. The default is anywhere from 4-6 based on team color and it goes to 1-3 on mouse over.

Only one post processing volume was required for this and I can keep Render Custom Depth on at all times.

Outline Working

@ClockworkOcean