Version: 2023.1

Terrain.heightmapMinimumLODSimplification

切换到手册
public int heightmapMinimumLODSimplification ;

描述

Limits how simplified the rendered terrain can be.

heightmapMinimumLODSimplification creates a lower limit on how much the terrain can be simplified. This property also affects areas that are outside of the camera frustum. Use this property when terrain that is outside of the view of the camera casts an overly simplified shadow inside the view of the camera. A value of 0 for this property does not limit the level of detail that the terrain can be reduced to. Each increment of this property's value quadruples the minimum number of triangles used to render the terrain. A high value for this property might reduce performance because of excessive time spent culling

using UnityEngine;

public class Example : MonoBehaviour { void Start() { Terrain.activeTerrain.heightmapMinimumLODSimplification = 2; } }