Directional lightmap in surface shader

How can I grab the directional lightmap data in a surface shader? I can’t seem to find much documentation online about this. And what I have found doesn’t seem to work. I thought I could do this :

    inline half4 LightingMobileBlinnPhong_DirLightmap(SurfaceOutput s, fixed4 color, fixed4 scale, bool surfFuncWritesNormal)
{
}

but that doesn’t appear to work

Or even a way to get it in the fragment shader would be nice to know

this is the error I get :

                  fixed3 lmDir = DecodeLightmap(UNITY_SAMPLE_TEX2D_SAMPLER(unity_LightmapInd,unity_Lightmap, i.uv1));

from this line :

Unrecognized sampler 'samplerunity_lightmap' - does not match any texture and is not a recognized inline name (should contain filter and wrap modes).
(on d3d11)