Render a Avatar head smaller for only one camera

Hello.

I am trying to render a avatars head to a scale of zero, but only for one camera.
This is meant for VR and should enable users to upload their own avatars easily and my game just “disables” the head rendering.

I ran into a problem though: I am using OnPreRender and OnPostRender, setting the scale of the head (Retrieved via Animator.GetBoneTransform) to zero and in Post back to it’s original.

The result was expected to render the head only for the attached camera to zero, but the scaling never happens. The only thing that does happen, is that child objects move to a different position.

public Animator Anim;
    private void OnPreRender()
    {
        if (Anim != null)
        {
            Anim.GetBoneTransform(HumanBodyBones.Head).localScale = Vector3.zero;
        }
    }

    private void OnPostRender()
    {
        if (Anim != null)
        {
            Anim.GetBoneTransform(HumanBodyBones.Head).localScale = Vector3.one;
        }
    }

Any help or a different solution on how to disable the head would be very appreciated.
Thanks.

We solved this by putting the head on a custom layer and setting the 1st person camera Culling Mask to ignore that layer.

It worked so well we use it for everything. But now we have so many overlapping dimensions (using cameras with culling masks to peek between them) and custom lighting layers (multiplying the # of possible layers a head could be on) that we’ve started to run up against the max limit of 32 layers. I wish camera culling worked with Unity’s tag system as well!