All objects which have an outline component are drawn all the time. Regardless if eraseRenderer is set to true or not.
Maybe I misunderstood the concept of the component. But if the outline should not be displayed when eraseRenderer is off, you would need to apply the following patch in OutlineEffect.OnPreRender:
// ...
if(outlines != null)
{
foreach(Outline outline in outlines)
{
LayerMask l = sourceCamera.cullingMask;
if(outline != null && l == (l | (1 << outline.originalLayer)))
{
//PATCH START
if (outline.eraseRenderer)
continue;
//PATCH END
for (int v = 0; v < outline.Renderer.sharedMaterials.Length; v++)
// ...
All objects which have an outline component are drawn all the time. Regardless if
eraseRenderer
is set to true or not. Maybe I misunderstood the concept of the component. But if the outline should not be displayed wheneraseRenderer
is off, you would need to apply the following patch inOutlineEffect.OnPreRender
: