Unlit/Transparent shader that casts shadows?

Hello,

I am building a mobile game, and have some 2D trees I want to put in the scene and have them cast shadows.

The solution I thought of is to have a Quad, and assign the tree as a texture to it.

Is there a shader that would be Unlit/Transparent and have it cast a shadow as well?

Is the solution I thought of any good?

Any help is appreciated!

Well, if it’s unlit, then it won’t use lighting… but if you want it to cast shadows, it needs to interact with the lighting. So, no, as far as I know, there’s no shader that will do both.

What you can do instead, would be to render twice. Once with an unlit shader, and once with a transparent standard shader set up in the meshrenderer to do shadows only.