文档

Unity Engine

Unity Engine

castShadows

Should terrain cast shadows?.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.TerrainModule
警告
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.