I there a way to allow a custom depth to foliage in unreal 4

I just checked in a change exposing CustomDepth properties to Foliage for 4.16.

If you can’t wait, it is a very simple code addition to expose the bRenderCustomDepth flag to foliage. The properties bRenderCustomDepth and CustomDepthStencilValue need to be copied from the UPrimitiveComponent class to the UFoliageType class. Then the FFoliageMeshInfo::UpdateComponentSettings function needs to be modified to copy these properties to the component when they are updated.

Cheers
Jack