commandbuffer can't get depth buffer in forward rendering but correct in Deferred .Why?

public void Awake()
MainCamera = GetComponent ();
MainCameraRT = RenderTexture.GetTemporary (Screen.width, Screen.height, 24);
depthTexture = Texture2D.CreateExternalTexture (Screen.width, Screen.height, TextureFormat.RGB24, false, false, MainCameraRT.GetNativeDepthBufferPtr ());
cmdBuffer = new CommandBuffer(); = “cmdBuffer”;

		cmdBuffer.Blit (BuiltinRenderTextureType.CurrentActive, MainCameraRT);

		MainCamera.AddCommandBuffer(CameraEvent.AfterSkybox, cmdBuffer);




I would like to know the answer to this as well. I am begging to suspect that the answer is manually redraw the scene using a depth material.