How to get depth map through a camera view?

I want to get the RGB-D (RGB image and depth image) through a camera and save it.

Is it possible to achieve this? I know some plugins that can do the thing(like airsim, unrealCV), but I want to get the RGB-D image every frame(in tick function).

Try using some post process material on the camera, materials do get the depth map , and materials can be used on camera, such as post process materials