Sprites and Casting / Receiving Shadows

I am new to Unity; just picked it up this week; so please bear with me.

I have been playing around with this all day and I still can’t seem to get a Sprite to RECEIVE a shadow. I figured the best way to approach this would be to go step by step on what I did to get to where I am then hopefully you guys can tell me what I missed.

Shader "Sprites/Diffuse/Shadows"
{
    Properties
    {
        [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
        _Color ("Tint", Color) = (1,1,1,1)
        [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
        _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.5
    }

    SubShader
    {
        Tags
        {
            "Queue"="Transparent"
            "IgnoreProjector"="True"
            "RenderType"="Transparent"
            "PreviewType"="Plane"
            "CanUseSpriteAtlas"="True"
        }

        Cull Off
        Lighting Off
        ZWrite Off
        Blend One OneMinusSrcAlpha

        CGPROGRAM
        #pragma surface surf Lambert vertex:vert nofog keepalpha addshadow
        #pragma multi_compile _ PIXELSNAP_ON

        sampler2D _MainTex;
        fixed4 _Color;

        struct Input
        {
            float2 uv_MainTex;
            fixed4 color;
        };
       
        void vert (inout appdata_full v, out Input o)
        {
            #if defined(PIXELSNAP_ON)
            v.vertex = UnityPixelSnap (v.vertex);
            #endif
           
            UNITY_INITIALIZE_OUTPUT(Input, o);
            o.color = v.color * _Color;
        }

        void surf (Input IN, inout SurfaceOutput o)
        {
            fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * IN.color;
            o.Albedo = c.rgb * c.a;
            o.Alpha = c.a;
        }
        ENDCG
    }

Fallback "Transparent/Cutout/VertexLit"
}

As you can see the Sprite “character” cast a shadow, the 3D Cube receives it but the Sprite “wall” does not. Any idea as to why?

Sorry for the old bump, but I’d also like to know this. I’ve got sprites set to cast and receive shadows from a spotlight, but it seems like only quads receive shadows cast from the sprites. Both sprites have a script attached to them to force them to cast and receive shadows, and I’ve even tried doing it through the debug menu. I’ve spent several hours researching, but haven’t found a way to make this work.

Anybody? This would really be helpful, many other shaders on google don`t work…

up too ^^

I got the solution, the Sprite should have Default-material for it to receive shadows. So if you have correct, working casting shadow shader, it will work.