# castShadows

> Should terrain cast shadows?.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

> **Warning:**
>
> **Deprecated.** castShadows is deprecated, please use shadowCastingMode instead.

```csharp
public bool castShadows { get; set; }
```

### Remarks

[Terrain.castShadows](/engine/6000.5/script-reference/unityengine/terrain/castshadows.md) is obsolete. Instead you should use [Terrain.shadowCastingMode](/engine/6000.5/script-reference/unityengine/terrain/shadowcastingmode.md) which allows setting all shadow casting modes. Setting castShadows to true sets shadowCastingMode to [ShadowCastingMode.TwoSided](/engine/6000.5/script-reference/unityengine/rendering/shadowcastingmode/twosided.md). Setting it to false sets shadowCastingMode to [ShadowCastingMode.Off](/engine/6000.5/script-reference/unityengine/rendering/shadowcastingmode/off.md).
