How sprite can cast and receive shadow from 3D light ?

Hello i would like to make a 2.5D game.

My player is a sprite but my background is in 3D as my light. I want to have a real time shadow of my player on environment and I would like than my player get environment shadow on him.

Pleas can you help me ?

Use an invisible shadow caster mesh to create a “fake” 3d shadow.

Attach that mesh with the shader to your character and it should work out fine.
There’s plenty of those shader examples if you google it.

You’ll need a 3d model that has a shape of the sprite though.

Alternatively, use a transparent / cutout shader + mesh renderer setup as quad instead of Sprite Renderer.

Here’s also: