Hello All,
First and foremost, please understand I did do a lot of searching, and trials/testing to try and get my sprites to cast shadows before posting this question. I went through the 2013 and various other responses related to sprite shadow casting, to no avail. Does someone have a small sample project or example of how to make sprites to cast shadows in the latest Unity? It seems it’s broken, at least on my computer…
do note, I previously was able to get sprite shadows rendering back in a Unity 5 build
Things I’ve tried:
- Created 2 completely new projects (to ensure other sample code/runtime code wasn’t messing with the general implementation
- Used about 10 different shaders to try and get a basic sprite shadow to show
- Tried the standard shader with cutout mode
- Added the latest code to enable sprites on my sprite game object
GetComponent<Renderer>().shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On;
GetComponent<Renderer>().receiveShadows = true;
- Tried enabling cast shadows and receive shadows in debug mode
- Tried using a third party asset store library (2DxFX)
None of the above worked for me. I’m doing a very simple cast from a spotlight , to a character, to a rear sprite… I cannot cast a shadow. I am not here because I can’t Google or search the forum, I think this is a pretty major issue, if others can reproduce.
Thank you for your time, and help!
-Haddy