Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


castShadows

Should terrain cast shadows?.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.TerrainModule
Warning
Deprecated. castShadows is deprecated, please use shadowCastingMode instead.
public bool castShadows { get; set; }

Remarks

Terrain.castShadows is obsolete. Instead you should use Terrain.shadowCastingMode which allows setting all shadow casting modes. Setting castShadows to true sets shadowCastingMode to ShadowCastingMode.TwoSided. Setting it to false sets shadowCastingMode to ShadowCastingMode.Off.