Hide part of an object behind invisible oject.

I dont know how to explain it, so need something like this:
[78859-снимок.png|78859]

Here is one solution:

The invisible object should need a custom shader (it would be very simple) that needs to be ‘additive’ while being black and at the same time write to the zbuffer. Something like this (untested):

   Properties
    {
_Color ("Color", Color) = (1,1,1,1)
    }
    SubShader
    {
        Tags { "RenderType"="Opaque"  }
		Lighting Off 
		Blend SrcAlpha One
 
        Pass
        {    
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
         
            #include "UnityCG.cginc"        
 
            struct appdata
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
				
            };
 
            struct v2f
            {
                float2 uv : TEXCOORD0;
                float4 vertex : SV_POSITION;
            };
 
         fixed4 _Color;		
            v2f vert (appdata v)
            {
                v2f o;
                o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
                o.uv = TRANSFORM_TEX(v.uv, _MainTex);
                return o;
            }
         
            fixed4 frag (v2f i) : SV_Target
            {
                return _Color;

            }
            ENDCG
        }

Then just make sure you set the color to black, and it should do what you want.
Note that this new shader will block ALL things, and will likely only draw the skybox where it is seen.