Version: Unity 6.4 (6000.4)
LanguageEnglish
  • C#

Terrain.enableHeightmapLODFrustumCulling

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public bool enableHeightmapLODFrustumCulling;

Description

Controls frustum culling for the terrain heightmap LOD system.

When enabled (the default), terrain patches outside the camera frustum are simplified aggressively, which reduces heightmap tessellation cost.

When disabled, terrain is tessellated based on camera distance and pixel error only, regardless of whether it is visible.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Note: disabling this increases heightmap tessellation cost for off-screen terrain. foreach (var terrain in Terrain.activeTerrains) terrain.enableHeightmapLODFrustumCulling = false; } }