How to cast realtime shadows?

Hi,
I’m very new to Unity and I don’t know how to cast realtime shadows on GameObjects, both imported and added from within Unity.

Any help will be greatly appreciated.

P.S. - I have Unity 4 Pro.

2 Answers

2

To start, make sure you have cast and receive shadows enabled on the GameObjects. Then, check the light that should be casting shadows and make sure that it has either soft or hard shadows turned on.

I did that but nothing shows up. I have created 2 cubes and a FP character controller, and a directional light. I've set up the 2 cubes the both Cast and Receive shadows and the light to create hard shadows. But nothing shows up. :(

–

Make sure your quality settings allow for shadow casting.

–

Try setting all your shaders on all the models in the Scene to Diffuse ..

–

First, check the shadow troubleshooting page: http://docs.unity3d.com/Manual/ShadowTroubleshooting.html

Second, check your rendering path supports realtime shadows for the type of light you’re using: Unity - Manual: Rendering paths in the Built-in Render Pipeline (in forward rendering, shadows can be given by up to 1 direction light only)

Third, try changing between Dual and Single lightmaps. I don’t know if this is universal, but my machine will only show realtime shadows when using dual lightmaps. Switching to single or directional lightmaps causes realtime shadows to disappear.

Fourth, try forcing Direct3D 9 or 11 or OpenGL rendering in case you have a driver-related limitation.